mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add missing check during ocl buffer create on Windows
resolves problem with debug break Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f629b403c8
commit
cf6d706d4b
@@ -182,10 +182,18 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||
auto &device = context->getDevice(0u)->getDevice();
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
auto productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
auto &osInterface = device.getRootDeviceEnvironment().osInterface;
|
||||
bool isLockable = true;
|
||||
if (osInterface) {
|
||||
isLockable = osInterface->isLockablePointer(memory->storageInfo.isLockable);
|
||||
}
|
||||
|
||||
bool copyOnCpuAllowed = implicitScalingEnabled == false &&
|
||||
size <= Buffer::maxBufferSizeForCopyOnCpu &&
|
||||
isCompressionEnabled == false &&
|
||||
productHelper->getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed;
|
||||
productHelper->getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed &&
|
||||
isLockable;
|
||||
if (DebugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
||||
copyOnCpuAllowed = DebugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user