Unify mapAllocation and hostPtrAllocation to transferAllocation

Change-Id: I875d6886ce3b0866da7679925ba973d2d16a1141
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-10-24 14:18:39 +02:00
committed by sys_ocldev
parent 224740207f
commit 6059e77fb4
6 changed files with 10 additions and 16 deletions

View File

@@ -37,8 +37,7 @@ struct BuiltinOpParams {
MemObj *dstMemObj = nullptr;
GraphicsAllocation *srcSvmAlloc = nullptr;
GraphicsAllocation *dstSvmAlloc = nullptr;
GraphicsAllocation *mapAllocation = nullptr;
GraphicsAllocation *hostPtrAllocation = nullptr;
GraphicsAllocation *transferAllocation = nullptr; //mapAllocation or hostPtrAllocation
const MemObjsForAuxTranslation *memObjsForAuxTranslation = nullptr;
AuxTranslationDirection auxTranslationDirection = AuxTranslationDirection::None;
bool unifiedMemoryArgsRequireMemSync = true;

View File

@@ -92,8 +92,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
dc.srcMemObj = buffer;
dc.srcOffset = {offset, 0, 0};
dc.size = {size, 0, 0};
dc.mapAllocation = mapAllocation;
dc.hostPtrAllocation = hostPtrSurf.getAllocation();
dc.transferAllocation = mapAllocation ? mapAllocation : hostPtrSurf.getAllocation();
builder.buildDispatchInfos(dispatchInfo, dc);
if (context->isProvidingPerformanceHints()) {

View File

@@ -88,8 +88,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
dc.dstMemObj = buffer;
dc.dstOffset = {offset, 0, 0};
dc.size = {size, 0, 0};
dc.mapAllocation = mapAllocation;
dc.hostPtrAllocation = hostPtrSurf.getAllocation();
dc.transferAllocation = mapAllocation ? mapAllocation : hostPtrSurf.getAllocation();
builder.buildDispatchInfos(dispatchInfo, dc);
enqueueHandler<CL_COMMAND_WRITE_BUFFER>(

View File

@@ -53,10 +53,7 @@ BlitProperties BlitProperties::constructPropertiesForReadWriteBuffer(BlitterCons
void *hostPtr = nullptr;
size_t hostPtrOffset = 0;
GraphicsAllocation *hostAllocation = builtinOpParams.hostPtrAllocation;
if (builtinOpParams.mapAllocation) {
hostAllocation = builtinOpParams.mapAllocation;
}
GraphicsAllocation *hostAllocation = builtinOpParams.transferAllocation;
if (BlitterConstants::BlitDirection::HostPtrToBuffer == blitDirection) {
// write buffer