mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Use memcpy_s instead of memcpy
Change-Id: I14ae0f782f38f21fa5a1ce1fd7125e97065b5a61 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2caeb739c3
commit
bc09c95a17
@@ -1098,7 +1098,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBlitFill(void *ptr,
|
||||
auto internalAlloc = device->getNEODevice()->getMemoryManager()->allocateGraphicsMemoryWithProperties(properties);
|
||||
size_t offset = 0;
|
||||
for (uint32_t i = 0; i < size / patternSize; i++) {
|
||||
memcpy(ptrOffset(internalAlloc->getDriverAllocatedCpuPtr(), offset), pattern, patternSize);
|
||||
memcpy_s(ptrOffset(internalAlloc->getDriverAllocatedCpuPtr(), offset), (internalAlloc->getUnderlyingBufferSize() - offset), pattern, patternSize);
|
||||
offset += patternSize;
|
||||
}
|
||||
auto ret = appendMemoryCopy(ptr, internalAlloc->getDriverAllocatedCpuPtr(), size, hEvent, 0, nullptr);
|
||||
@@ -1113,7 +1113,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBlitFill(void *ptr,
|
||||
}
|
||||
commandContainer.addToResidencyContainer(allocData->gpuAllocation);
|
||||
uint32_t patternToCommand[4] = {};
|
||||
memcpy(&patternToCommand, pattern, patternSize);
|
||||
memcpy_s(&patternToCommand, sizeof(patternToCommand), pattern, patternSize);
|
||||
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(allocData->gpuAllocation, patternToCommand, patternSize, *commandContainer.getCommandStream(), size, *device->getNEODevice()->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]);
|
||||
if (hEvent) {
|
||||
this->appendSignalEventPostWalker(hEvent);
|
||||
|
||||
Reference in New Issue
Block a user