mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Revert "Fix Read/WriteBuffer for unaligned offsets"
This reverts commit 6ea863e440.
Change-Id: Ib58cfe4cffc022b1514c42131914eb2fe64fcbe0
This commit is contained in:
@@ -84,16 +84,9 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
|
||||
BuiltInOwnershipWrapper builtInLock(builder, this->context);
|
||||
|
||||
void *dstPtr = ptr;
|
||||
void *alignedDstPtr = dstPtr;
|
||||
size_t dstPtrOffset = 0;
|
||||
|
||||
if (!isAligned<4>(dstPtr)) {
|
||||
alignedDstPtr = alignDown(dstPtr, 4);
|
||||
dstPtrOffset = ptrDiff(dstPtr, alignedDstPtr);
|
||||
}
|
||||
|
||||
MemObjSurface bufferSurf(buffer);
|
||||
HostPtrSurface hostPtrSurf(alignedDstPtr, size + dstPtrOffset);
|
||||
HostPtrSurface hostPtrSurf(dstPtr, size);
|
||||
Surface *surfaces[] = {&bufferSurf, &hostPtrSurf};
|
||||
|
||||
if (size != 0) {
|
||||
@@ -101,13 +94,11 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
|
||||
if (!status) {
|
||||
return CL_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
hostPtrSurf.getAllocation()->allocationOffset = dstPtrOffset;
|
||||
dstPtr = reinterpret_cast<void *>(hostPtrSurf.getAllocation()->getGpuAddressToPatch());
|
||||
}
|
||||
|
||||
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
|
||||
dc.dstPtr = alignedDstPtr;
|
||||
dc.dstOffset = {dstPtrOffset, 0, 0};
|
||||
dc.dstPtr = dstPtr;
|
||||
dc.srcMemObj = buffer;
|
||||
dc.srcOffset = {offset, 0, 0};
|
||||
dc.size = {size, 0, 0};
|
||||
|
||||
Reference in New Issue
Block a user