mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Code cleanup - avoid copy 5/n
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ae88789bce
commit
a924b6a304
@@ -179,10 +179,10 @@ struct CommandListCoreFamily : CommandListImp {
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
|
||||
MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyKernel2d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation,
|
||||
@@ -208,11 +208,11 @@ struct CommandListCoreFamily : CommandListImp {
|
||||
|
||||
MOCKABLE_VIRTUAL ze_result_t appendCopyImageBlit(NEO::GraphicsAllocation *src,
|
||||
NEO::GraphicsAllocation *dst,
|
||||
Vec3<size_t> srcOffsets, Vec3<size_t> dstOffsets,
|
||||
const Vec3<size_t> &srcOffsets, const Vec3<size_t> &dstOffsets,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
size_t bytesPerPixel, Vec3<size_t> copySize,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent);
|
||||
size_t bytesPerPixel, const Vec3<size_t> ©Size,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent);
|
||||
|
||||
MOCKABLE_VIRTUAL ze_result_t appendLaunchKernelWithParams(ze_kernel_handle_t hKernel,
|
||||
const ze_group_count_t *pThreadGroupDimensions,
|
||||
|
||||
@@ -883,10 +883,10 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(NEO
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
|
||||
@@ -896,12 +896,13 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(NEO
|
||||
bool copyOneCommand = NEO::BlitCommandsHelper<GfxFamily>::useOneBlitCopyCommand(copySize, bytesPerPixel);
|
||||
Vec3<size_t> srcPtrOffset = {(copyOneCommand ? (srcRegion.originX / bytesPerPixel) : srcRegion.originX), srcRegion.originY, srcRegion.originZ};
|
||||
Vec3<size_t> dstPtrOffset = {(copyOneCommand ? (dstRegion.originX / bytesPerPixel) : dstRegion.originX), dstRegion.originY, dstRegion.originZ};
|
||||
copySize.x = copyOneCommand ? copySize.x / bytesPerPixel : copySize.x;
|
||||
auto copySizeModified = copySize;
|
||||
copySizeModified.x = copyOneCommand ? copySizeModified.x / bytesPerPixel : copySizeModified.x;
|
||||
|
||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||
|
||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc, srcAlloc,
|
||||
dstPtrOffset, srcPtrOffset, copySize, srcRowPitch, srcSlicePitch,
|
||||
dstPtrOffset, srcPtrOffset, copySizeModified, srcRowPitch, srcSlicePitch,
|
||||
dstRowPitch, dstSlicePitch, clearColorAllocation);
|
||||
commandContainer.addToResidencyContainer(dstAlloc);
|
||||
commandContainer.addToResidencyContainer(srcAlloc);
|
||||
@@ -928,11 +929,11 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(NEO
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendCopyImageBlit(NEO::GraphicsAllocation *src,
|
||||
NEO::GraphicsAllocation *dst,
|
||||
Vec3<size_t> srcOffsets, Vec3<size_t> dstOffsets,
|
||||
const Vec3<size_t> &srcOffsets, const Vec3<size_t> &dstOffsets,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
size_t bytesPerPixel, Vec3<size_t> copySize,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent) {
|
||||
size_t bytesPerPixel, const Vec3<size_t> ©Size,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
|
||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||
|
||||
@@ -57,10 +57,10 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override {
|
||||
appendMemoryCopyBlitRegionCalledTimes++;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
@@ -95,11 +95,11 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
}
|
||||
ze_result_t appendCopyImageBlit(NEO::GraphicsAllocation *src,
|
||||
NEO::GraphicsAllocation *dst,
|
||||
Vec3<size_t> srcOffsets, Vec3<size_t> dstOffsets,
|
||||
const Vec3<size_t> &srcOffsets, const Vec3<size_t> &dstOffsets,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
size_t bytesPerPixel, Vec3<size_t> copySize,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent) override {
|
||||
size_t bytesPerPixel, const Vec3<size_t> ©Size,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent) override {
|
||||
appendCopyImageBlitCalledTimes++;
|
||||
appendImageRegionCopySize = copySize;
|
||||
appendImageRegionSrcOrigin = srcOffsets;
|
||||
@@ -901,10 +901,10 @@ class MockCommandListForRegionSize : public WhiteBox<::L0::CommandListCoreFamily
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override {
|
||||
this->srcSize = srcSize;
|
||||
this->dstSize = dstSize;
|
||||
|
||||
@@ -56,10 +56,10 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override {
|
||||
appendMemoryCopyBlitRegionCalledTimes++;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
@@ -94,11 +94,11 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
}
|
||||
ze_result_t appendCopyImageBlit(NEO::GraphicsAllocation *src,
|
||||
NEO::GraphicsAllocation *dst,
|
||||
Vec3<size_t> srcOffsets, Vec3<size_t> dstOffsets,
|
||||
const Vec3<size_t> &srcOffsets, const Vec3<size_t> &dstOffsets,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
size_t bytesPerPixel, Vec3<size_t> copySize,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent) override {
|
||||
size_t bytesPerPixel, const Vec3<size_t> ©Size,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent) override {
|
||||
appendCopyImageBlitCalledTimes++;
|
||||
appendImageRegionCopySize = copySize;
|
||||
appendImageRegionSrcOrigin = srcOffsets;
|
||||
@@ -156,10 +156,10 @@ class MockAppendMemoryCopy : public MockCommandListHw<gfxCoreFamily> {
|
||||
size_t srcOffset,
|
||||
size_t dstOffset,
|
||||
ze_copy_region_t srcRegion,
|
||||
ze_copy_region_t dstRegion, Vec3<size_t> copySize,
|
||||
ze_copy_region_t dstRegion, const Vec3<size_t> ©Size,
|
||||
size_t srcRowPitch, size_t srcSlicePitch,
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
Vec3<size_t> srcSize, Vec3<size_t> dstSize, ze_event_handle_t hSignalEvent,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize, ze_event_handle_t hSignalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override {
|
||||
srcBlitCopyRegionOffset = srcOffset;
|
||||
dstBlitCopyRegionOffset = dstOffset;
|
||||
|
||||
Reference in New Issue
Block a user