mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Unify mapAllocation and hostPtrAllocation to transferAllocation
Change-Id: I875d6886ce3b0866da7679925ba973d2d16a1141 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
224740207f
commit
6059e77fb4
@@ -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;
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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>(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user