mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Extend key to host ptr fragments container
use separated entries per root device Related-To: NEO-3691 Change-Id: I26b85b8852b23e6a4d290da689174c59343536b3 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
c3a1880492
commit
1a1b4b1c26
@ -187,7 +187,7 @@ Buffer *Buffer::create(Context *context,
|
||||
memoryManager->isLocalMemorySupported(rootDeviceIndex),
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily).obtainRenderBufferCompressionPreference(context->getDevice(0)->getHardwareInfo(), size));
|
||||
|
||||
checkMemory(memoryProperties, size, hostPtr, errcodeRet, alignementSatisfied, copyMemoryFromHostPtr, memoryManager);
|
||||
checkMemory(memoryProperties, size, hostPtr, errcodeRet, alignementSatisfied, copyMemoryFromHostPtr, memoryManager, rootDeviceIndex);
|
||||
|
||||
if (errcodeRet != CL_SUCCESS) {
|
||||
return nullptr;
|
||||
@ -384,7 +384,8 @@ void Buffer::checkMemory(MemoryProperties memoryProperties,
|
||||
cl_int &errcodeRet,
|
||||
bool &alignementSatisfied,
|
||||
bool ©MemoryFromHostPtr,
|
||||
MemoryManager *memoryManager) {
|
||||
MemoryManager *memoryManager,
|
||||
uint32_t rootDeviceIndex) {
|
||||
errcodeRet = CL_SUCCESS;
|
||||
alignementSatisfied = true;
|
||||
copyMemoryFromHostPtr = false;
|
||||
@ -403,7 +404,7 @@ void Buffer::checkMemory(MemoryProperties memoryProperties,
|
||||
|
||||
if (memoryProperties.flags.useHostPtr) {
|
||||
if (hostPtr) {
|
||||
auto fragment = memoryManager->getHostPtrManager()->getFragment(hostPtr);
|
||||
auto fragment = memoryManager->getHostPtrManager()->getFragment({hostPtr, rootDeviceIndex});
|
||||
if (fragment && fragment->driverAllocation) {
|
||||
errcodeRet = CL_INVALID_HOST_PTR;
|
||||
return;
|
||||
|
@ -178,7 +178,8 @@ class Buffer : public MemObj {
|
||||
cl_int &errcodeRet,
|
||||
bool &isZeroCopy,
|
||||
bool ©MemoryFromHostPtr,
|
||||
MemoryManager *memMngr);
|
||||
MemoryManager *memMngr,
|
||||
uint32_t rootDeviceIndex);
|
||||
static GraphicsAllocation::AllocationType getGraphicsAllocationType(const MemoryProperties &properties, Context &context,
|
||||
bool renderCompressedBuffers, bool localMemoryEnabled,
|
||||
bool preferCompression);
|
||||
|
Reference in New Issue
Block a user