diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 85e624864e..e817c35558 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -829,7 +829,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyBlit(uintptr_t auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation(); using GfxFamily = typename NEO::GfxFamilyMapper::GfxFamily; - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstPtrAlloc, srcPtrAlloc, {dstOffset, 0, 0}, {srcOffset, 0, 0}, {size, 0, 0}, 0, 0, 0, 0, clearColorAllocation); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstPtrAlloc, srcPtrAlloc, {dstOffset, 0, 0}, {srcOffset, 0, 0}, {size, 0, 0}, 0, 0, 0, 0, clearColorAllocation); commandContainer.addToResidencyContainer(dstPtrAlloc); commandContainer.addToResidencyContainer(srcPtrAlloc); commandContainer.addToResidencyContainer(clearColorAllocation); @@ -862,9 +862,9 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyBlitRegion(NEO auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation(); - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc, srcAlloc, - dstPtrOffset, srcPtrOffset, copySize, srcRowPitch, srcSlicePitch, - dstRowPitch, dstSlicePitch, clearColorAllocation); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc, srcAlloc, + dstPtrOffset, srcPtrOffset, copySize, srcRowPitch, srcSlicePitch, + dstRowPitch, dstSlicePitch, clearColorAllocation); commandContainer.addToResidencyContainer(dstAlloc); commandContainer.addToResidencyContainer(srcAlloc); commandContainer.addToResidencyContainer(clearColorAllocation); @@ -899,9 +899,9 @@ ze_result_t CommandListCoreFamily::appendCopyImageBlit(NEO::Graph auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation(); - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dst, src, - dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, - dstRowPitch, dstSlicePitch, clearColorAllocation); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dst, src, + dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, + dstRowPitch, dstSlicePitch, clearColorAllocation); blitProperties.bytesPerPixel = bytesPerPixel; blitProperties.srcSize = srcSize; blitProperties.dstSize = dstSize; diff --git a/opencl/source/helpers/cl_blit_properties.h b/opencl/source/helpers/cl_blit_properties.h index 10f33ce176..8de1317fc1 100644 --- a/opencl/source/helpers/cl_blit_properties.h +++ b/opencl/source/helpers/cl_blit_properties.h @@ -43,13 +43,13 @@ struct ClBlitProperties { srcOffset += ptrDiff(builtinOpParams.srcPtr, srcAllocation->getGpuAddress()); } - blitProperties = BlitProperties::constructPropertiesForCopyBuffer(dstAllocation, - srcAllocation, - {dstOffset, builtinOpParams.dstOffset.y, builtinOpParams.dstOffset.z}, - {srcOffset, builtinOpParams.srcOffset.y, builtinOpParams.srcOffset.z}, - builtinOpParams.size, - builtinOpParams.srcRowPitch, builtinOpParams.srcSlicePitch, - builtinOpParams.dstRowPitch, builtinOpParams.dstSlicePitch, clearColorAllocation); + blitProperties = BlitProperties::constructPropertiesForCopy(dstAllocation, + srcAllocation, + {dstOffset, builtinOpParams.dstOffset.y, builtinOpParams.dstOffset.z}, + {srcOffset, builtinOpParams.srcOffset.y, builtinOpParams.srcOffset.z}, + builtinOpParams.size, + builtinOpParams.srcRowPitch, builtinOpParams.srcSlicePitch, + builtinOpParams.dstRowPitch, builtinOpParams.dstSlicePitch, clearColorAllocation); if (BlitterConstants::BlitDirection::ImageToImage == blitDirection) { blitProperties.blitDirection = blitDirection; diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp index 6525746276..106d8b0989 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -1162,7 +1162,7 @@ HWTEST_F(AubCommandStreamReceiverTests, WhenBlitBufferIsCalledThenCounterIsCorre EXPECT_EQ(0u, aubCsr->blitBufferCalled); MockGraphicsAllocation allocation(reinterpret_cast(0x1000), 0); - BlitProperties blitProperties = BlitProperties::constructPropertiesForCopyBuffer(&allocation, &allocation, 0, 0, 0, 0, 0, 0, 0, aubCsr->getClearColorAllocation()); + BlitProperties blitProperties = BlitProperties::constructPropertiesForCopy(&allocation, &allocation, 0, 0, 0, 0, 0, 0, 0, aubCsr->getClearColorAllocation()); BlitPropertiesContainer blitPropertiesContainer; blitPropertiesContainer.push_back(blitProperties); aubCsr->blitBuffer(blitPropertiesContainer, true, false, *pDevice); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp index 1607f718ac..4f22b37d8e 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp @@ -1264,16 +1264,16 @@ HWTEST_P(BcsDetaliedTestsWithParams, givenBltSizeWithLeftoverWhenDispatchedThenP size_t buffer2SlicePitch = std::get<0>(GetParam()).srcSlicePitch; auto allocation = buffer1->getGraphicsAllocation(pDevice->getRootDeviceIndex()); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, //dstAllocation - allocation, //srcAllocation - buffer1Offset, //dstOffset - buffer2Offset, //srcOffset - bltSize, //copySize - buffer1RowPitch, //srcRowPitch - buffer1SlicePitch, //srcSlicePitch - buffer2RowPitch, //dstRowPitch - buffer2SlicePitch, //dstSlicePitch - csr.getClearColorAllocation() //clearColorAllocation + auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, //dstAllocation + allocation, //srcAllocation + buffer1Offset, //dstOffset + buffer2Offset, //srcOffset + bltSize, //copySize + buffer1RowPitch, //srcRowPitch + buffer1SlicePitch, //srcSlicePitch + buffer2RowPitch, //dstRowPitch + buffer2SlicePitch, //dstSlicePitch + csr.getClearColorAllocation() //clearColorAllocation ); blitBuffer(&csr, blitProperties, true, *pDevice); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 93b4f232fb..c0d7c3b029 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -691,8 +691,8 @@ HWTEST_F(BcsTests, givenBufferWhenBlitOperationCalledThenProgramCorrectGpuAddres // Buffer to Buffer HardwareParse hwParser; auto offset = csr.commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(graphicsAllocation1, - graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, csr.getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(graphicsAllocation1, + graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, csr.getClearColorAllocation()); blitBuffer(&csr, blitProperties, true, *pDevice); @@ -1092,9 +1092,9 @@ HWTEST_F(BcsTests, givenBufferWithOffsetWhenBlitOperationCalledThenProgramCorrec // Buffer to Buffer HardwareParse hwParser; auto offset = csr.commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(graphicsAllocation1, - graphicsAllocation2, - {buffer1Offset, 0, 0}, {buffer2Offset, 0, 0}, copySize, 0, 0, 0, 0, csr.getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(graphicsAllocation1, + graphicsAllocation2, + {buffer1Offset, 0, 0}, {buffer2Offset, 0, 0}, copySize, 0, 0, 0, 0, csr.getClearColorAllocation()); blitBuffer(&csr, blitProperties, true, *pDevice); @@ -1683,8 +1683,8 @@ HWTEST_F(BcsTests, givenBlitBufferCalledWhenClearColorAllocationIseSetThenItIsMa csr.storeMakeResidentAllocations = true; Vec3 copySize = {1, 1, 1}; - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(&graphicsAllocation1, - &graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, &clearColorAllocation); + auto blitProperties = BlitProperties::constructPropertiesForCopy(&graphicsAllocation1, + &graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, &clearColorAllocation); blitBuffer(&csr, blitProperties, false, *pDevice); auto iter = csr.makeResidentAllocations.find(&clearColorAllocation); ASSERT_NE(iter, csr.makeResidentAllocations.end()); diff --git a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp index 137d002d58..ee36853f57 100644 --- a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp @@ -67,9 +67,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenCompressedBufferWhenProgrammingBltCo uint32_t compressionFormat = gmmHelper->getClientContext()->getSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT::GMM_FORMAT_GENERIC_8BIT); { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -89,9 +89,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenCompressedBufferWhenProgrammingBltCo { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); HardwareParse hwParser; @@ -125,9 +125,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagSetWhenCompressionEnabledTh bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getDefaultGmm()->isCompressionEnabled = false; { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -147,9 +147,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagSetWhenCompressionEnabledTh { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); HardwareParse hwParser; @@ -176,9 +176,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS cl_int retVal = CL_SUCCESS; auto buffer = clUniquePtr(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal)); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -205,9 +205,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS cl_int retVal = CL_SUCCESS; auto buffer = clUniquePtr(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal)); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -281,8 +281,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, given2dBlitCommandWhenDispatchingThenSetV size_t offset = 0; { // 1D - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, allocation, - 0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation, + 0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, false, clDevice->getDevice()); HardwareParse hwParser; @@ -305,8 +305,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, given2dBlitCommandWhenDispatchingThenSetV { // 2D - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, allocation, - 0, 0, {(2 * BlitterConstants::maxBlitWidth) + 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation, + 0, 0, {(2 * BlitterConstants::maxBlitWidth) + 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, false, clDevice->getDevice()); HardwareParse hwParser; @@ -339,9 +339,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool())); { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -357,9 +357,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -393,9 +393,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool())); { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -415,9 +415,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -452,9 +452,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS DebugManager.flags.OverrideBlitterTargetMemory.set(0u); { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -470,9 +470,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS DebugManager.flags.OverrideBlitterTargetMemory.set(1u); { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -489,9 +489,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS DebugManager.flags.OverrideBlitterTargetMemory.set(2u); { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -522,9 +522,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandAndRe EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool())); { - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); @@ -540,9 +540,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandAndRe { auto offset = csr->commandStream.getUsed(); - auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), - 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); + auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()), + 0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation()); blitBuffer(csr, blitProperties, true, clDevice->getDevice()); diff --git a/shared/source/helpers/blit_commands_helper.cpp b/shared/source/helpers/blit_commands_helper.cpp index 2c6daed9bd..8417c8f7db 100644 --- a/shared/source/helpers/blit_commands_helper.cpp +++ b/shared/source/helpers/blit_commands_helper.cpp @@ -93,10 +93,10 @@ BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants: }; } -BlitProperties BlitProperties::constructPropertiesForCopyBuffer(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation, - Vec3 dstOffset, Vec3 srcOffset, Vec3 copySize, - size_t srcRowPitch, size_t srcSlicePitch, - size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation) { +BlitProperties BlitProperties::constructPropertiesForCopy(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation, + Vec3 dstOffset, Vec3 srcOffset, Vec3 copySize, + size_t srcRowPitch, size_t srcSlicePitch, + size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation) { copySize.y = copySize.y ? copySize.y : 1; copySize.z = copySize.z ? copySize.z : 1; diff --git a/shared/source/helpers/blit_commands_helper.h b/shared/source/helpers/blit_commands_helper.h index 3b9a562214..80752ec6bc 100644 --- a/shared/source/helpers/blit_commands_helper.h +++ b/shared/source/helpers/blit_commands_helper.h @@ -49,10 +49,10 @@ struct BlitProperties { size_t hostRowPitch, size_t hostSlicePitch, size_t gpuRowPitch, size_t gpuSlicePitch); - static BlitProperties constructPropertiesForCopyBuffer(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation, - Vec3 dstOffset, Vec3 srcOffset, Vec3 copySize, - size_t srcRowPitch, size_t srcSlicePitch, - size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation); + static BlitProperties constructPropertiesForCopy(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation, + Vec3 dstOffset, Vec3 srcOffset, Vec3 copySize, + size_t srcRowPitch, size_t srcSlicePitch, + size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation); static BlitProperties constructPropertiesForAuxTranslation(AuxTranslationDirection auxTranslationDirection, GraphicsAllocation *allocation, GraphicsAllocation *clearColorAllocation); diff --git a/shared/test/common/helpers/blit_commands_helper_tests.cpp b/shared/test/common/helpers/blit_commands_helper_tests.cpp index 5fc4edbbc5..2a2e44e006 100644 --- a/shared/test/common/helpers/blit_commands_helper_tests.cpp +++ b/shared/test/common/helpers/blit_commands_helper_tests.cpp @@ -83,9 +83,9 @@ TEST(BlitCommandsHelperTest, GivenBufferParamsWhenConstructingPropertiesForBuffe size_t dstRowPitch = 2; size_t dstSlicePitch = 3; - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc.get(), srcAlloc.get(), - dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, - dstRowPitch, dstSlicePitch, clearColorAllocation.get()); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc.get(), srcAlloc.get(), + dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, + dstRowPitch, dstSlicePitch, clearColorAllocation.get()); EXPECT_EQ(blitProperties.blitDirection, BlitterConstants::BlitDirection::BufferToBuffer); EXPECT_EQ(blitProperties.dstAllocation, dstAlloc.get()); @@ -122,9 +122,9 @@ TEST(BlitCommandsHelperTest, GivenCopySizeYAndZEqual0WhenConstructingPropertiesF size_t dstRowPitch = 2; size_t dstSlicePitch = 3; - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc.get(), srcAlloc.get(), - dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, - dstRowPitch, dstSlicePitch, clearColorAllocation.get()); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc.get(), srcAlloc.get(), + dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, + dstRowPitch, dstSlicePitch, clearColorAllocation.get()); Vec3 expectedSize{copySize.x, 1, 1}; EXPECT_EQ(blitProperties.copySize, expectedSize); } @@ -428,9 +428,9 @@ HWTEST2_F(BlitTests, givenMemoryAndImageWhenDispatchCopyImageCallThenCommandAdde size_t dstRowPitch = dstSize.x; size_t dstSlicePitch = dstSize.y; - auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(&dstAlloc, &srcAlloc, - dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, - dstRowPitch, dstSlicePitch, &clearColorAllocation); + auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(&dstAlloc, &srcAlloc, + dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch, + dstRowPitch, dstSlicePitch, &clearColorAllocation); uint32_t streamBuffer[100] = {}; LinearStream stream(streamBuffer, sizeof(streamBuffer));