mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
Reuse graphics allocations in readBufferRect/writeBufferRect
Related-To: NEO-6352 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9c1e7422b1
commit
a582f34c04
@@ -77,11 +77,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
|
||||
if (mapAllocation) {
|
||||
surfaces[1] = &mapSurface;
|
||||
mapSurface.setGraphicsAllocation(mapAllocation);
|
||||
//get offset between base cpu ptr of map allocation and dst ptr
|
||||
if ((memoryType != DEVICE_UNIFIED_MEMORY) && (memoryType != SHARED_UNIFIED_MEMORY)) {
|
||||
size_t srcOffset = ptrDiff(srcPtr, mapAllocation->getUnderlyingBuffer());
|
||||
srcPtr = reinterpret_cast<void *>(mapAllocation->getGpuAddress() + srcOffset);
|
||||
}
|
||||
srcPtr = convertAddressWithOffsetToGpuVa(srcPtr, memoryType, *mapAllocation);
|
||||
} else {
|
||||
surfaces[1] = &hostPtrSurf;
|
||||
if (size != 0) {
|
||||
|
||||
Reference in New Issue
Block a user