Rename constructPropertiesForCopyBuffer to constructPropertiesForCopy
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-4692
This commit is contained in:
parent
4192fc7d86
commit
4533595274
|
@ -829,7 +829,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlit(uintptr_t
|
||||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||||
|
|
||||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::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(dstPtrAlloc);
|
||||||
commandContainer.addToResidencyContainer(srcPtrAlloc);
|
commandContainer.addToResidencyContainer(srcPtrAlloc);
|
||||||
commandContainer.addToResidencyContainer(clearColorAllocation);
|
commandContainer.addToResidencyContainer(clearColorAllocation);
|
||||||
|
@ -862,9 +862,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(NEO
|
||||||
|
|
||||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||||
|
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc, srcAlloc,
|
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc, srcAlloc,
|
||||||
dstPtrOffset, srcPtrOffset, copySize, srcRowPitch, srcSlicePitch,
|
dstPtrOffset, srcPtrOffset, copySize, srcRowPitch, srcSlicePitch,
|
||||||
dstRowPitch, dstSlicePitch, clearColorAllocation);
|
dstRowPitch, dstSlicePitch, clearColorAllocation);
|
||||||
commandContainer.addToResidencyContainer(dstAlloc);
|
commandContainer.addToResidencyContainer(dstAlloc);
|
||||||
commandContainer.addToResidencyContainer(srcAlloc);
|
commandContainer.addToResidencyContainer(srcAlloc);
|
||||||
commandContainer.addToResidencyContainer(clearColorAllocation);
|
commandContainer.addToResidencyContainer(clearColorAllocation);
|
||||||
|
@ -899,9 +899,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendCopyImageBlit(NEO::Graph
|
||||||
|
|
||||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||||
|
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dst, src,
|
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dst, src,
|
||||||
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
||||||
dstRowPitch, dstSlicePitch, clearColorAllocation);
|
dstRowPitch, dstSlicePitch, clearColorAllocation);
|
||||||
blitProperties.bytesPerPixel = bytesPerPixel;
|
blitProperties.bytesPerPixel = bytesPerPixel;
|
||||||
blitProperties.srcSize = srcSize;
|
blitProperties.srcSize = srcSize;
|
||||||
blitProperties.dstSize = dstSize;
|
blitProperties.dstSize = dstSize;
|
||||||
|
|
|
@ -43,13 +43,13 @@ struct ClBlitProperties {
|
||||||
srcOffset += ptrDiff(builtinOpParams.srcPtr, srcAllocation->getGpuAddress());
|
srcOffset += ptrDiff(builtinOpParams.srcPtr, srcAllocation->getGpuAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
blitProperties = BlitProperties::constructPropertiesForCopyBuffer(dstAllocation,
|
blitProperties = BlitProperties::constructPropertiesForCopy(dstAllocation,
|
||||||
srcAllocation,
|
srcAllocation,
|
||||||
{dstOffset, builtinOpParams.dstOffset.y, builtinOpParams.dstOffset.z},
|
{dstOffset, builtinOpParams.dstOffset.y, builtinOpParams.dstOffset.z},
|
||||||
{srcOffset, builtinOpParams.srcOffset.y, builtinOpParams.srcOffset.z},
|
{srcOffset, builtinOpParams.srcOffset.y, builtinOpParams.srcOffset.z},
|
||||||
builtinOpParams.size,
|
builtinOpParams.size,
|
||||||
builtinOpParams.srcRowPitch, builtinOpParams.srcSlicePitch,
|
builtinOpParams.srcRowPitch, builtinOpParams.srcSlicePitch,
|
||||||
builtinOpParams.dstRowPitch, builtinOpParams.dstSlicePitch, clearColorAllocation);
|
builtinOpParams.dstRowPitch, builtinOpParams.dstSlicePitch, clearColorAllocation);
|
||||||
|
|
||||||
if (BlitterConstants::BlitDirection::ImageToImage == blitDirection) {
|
if (BlitterConstants::BlitDirection::ImageToImage == blitDirection) {
|
||||||
blitProperties.blitDirection = blitDirection;
|
blitProperties.blitDirection = blitDirection;
|
||||||
|
|
|
@ -1162,7 +1162,7 @@ HWTEST_F(AubCommandStreamReceiverTests, WhenBlitBufferIsCalledThenCounterIsCorre
|
||||||
EXPECT_EQ(0u, aubCsr->blitBufferCalled);
|
EXPECT_EQ(0u, aubCsr->blitBufferCalled);
|
||||||
|
|
||||||
MockGraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0);
|
MockGraphicsAllocation allocation(reinterpret_cast<void *>(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 blitPropertiesContainer;
|
||||||
blitPropertiesContainer.push_back(blitProperties);
|
blitPropertiesContainer.push_back(blitProperties);
|
||||||
aubCsr->blitBuffer(blitPropertiesContainer, true, false, *pDevice);
|
aubCsr->blitBuffer(blitPropertiesContainer, true, false, *pDevice);
|
||||||
|
|
|
@ -1264,16 +1264,16 @@ HWTEST_P(BcsDetaliedTestsWithParams, givenBltSizeWithLeftoverWhenDispatchedThenP
|
||||||
size_t buffer2SlicePitch = std::get<0>(GetParam()).srcSlicePitch;
|
size_t buffer2SlicePitch = std::get<0>(GetParam()).srcSlicePitch;
|
||||||
auto allocation = buffer1->getGraphicsAllocation(pDevice->getRootDeviceIndex());
|
auto allocation = buffer1->getGraphicsAllocation(pDevice->getRootDeviceIndex());
|
||||||
|
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, //dstAllocation
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, //dstAllocation
|
||||||
allocation, //srcAllocation
|
allocation, //srcAllocation
|
||||||
buffer1Offset, //dstOffset
|
buffer1Offset, //dstOffset
|
||||||
buffer2Offset, //srcOffset
|
buffer2Offset, //srcOffset
|
||||||
bltSize, //copySize
|
bltSize, //copySize
|
||||||
buffer1RowPitch, //srcRowPitch
|
buffer1RowPitch, //srcRowPitch
|
||||||
buffer1SlicePitch, //srcSlicePitch
|
buffer1SlicePitch, //srcSlicePitch
|
||||||
buffer2RowPitch, //dstRowPitch
|
buffer2RowPitch, //dstRowPitch
|
||||||
buffer2SlicePitch, //dstSlicePitch
|
buffer2SlicePitch, //dstSlicePitch
|
||||||
csr.getClearColorAllocation() //clearColorAllocation
|
csr.getClearColorAllocation() //clearColorAllocation
|
||||||
);
|
);
|
||||||
blitBuffer(&csr, blitProperties, true, *pDevice);
|
blitBuffer(&csr, blitProperties, true, *pDevice);
|
||||||
|
|
||||||
|
|
|
@ -691,8 +691,8 @@ HWTEST_F(BcsTests, givenBufferWhenBlitOperationCalledThenProgramCorrectGpuAddres
|
||||||
// Buffer to Buffer
|
// Buffer to Buffer
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
auto offset = csr.commandStream.getUsed();
|
auto offset = csr.commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(graphicsAllocation1,
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(graphicsAllocation1,
|
||||||
graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, csr.getClearColorAllocation());
|
graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, csr.getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(&csr, blitProperties, true, *pDevice);
|
blitBuffer(&csr, blitProperties, true, *pDevice);
|
||||||
|
|
||||||
|
@ -1092,9 +1092,9 @@ HWTEST_F(BcsTests, givenBufferWithOffsetWhenBlitOperationCalledThenProgramCorrec
|
||||||
// Buffer to Buffer
|
// Buffer to Buffer
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
auto offset = csr.commandStream.getUsed();
|
auto offset = csr.commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(graphicsAllocation1,
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(graphicsAllocation1,
|
||||||
graphicsAllocation2,
|
graphicsAllocation2,
|
||||||
{buffer1Offset, 0, 0}, {buffer2Offset, 0, 0}, copySize, 0, 0, 0, 0, csr.getClearColorAllocation());
|
{buffer1Offset, 0, 0}, {buffer2Offset, 0, 0}, copySize, 0, 0, 0, 0, csr.getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(&csr, blitProperties, true, *pDevice);
|
blitBuffer(&csr, blitProperties, true, *pDevice);
|
||||||
|
|
||||||
|
@ -1683,8 +1683,8 @@ HWTEST_F(BcsTests, givenBlitBufferCalledWhenClearColorAllocationIseSetThenItIsMa
|
||||||
csr.storeMakeResidentAllocations = true;
|
csr.storeMakeResidentAllocations = true;
|
||||||
Vec3<size_t> copySize = {1, 1, 1};
|
Vec3<size_t> copySize = {1, 1, 1};
|
||||||
|
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(&graphicsAllocation1,
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(&graphicsAllocation1,
|
||||||
&graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, &clearColorAllocation);
|
&graphicsAllocation2, 0, 0, copySize, 0, 0, 0, 0, &clearColorAllocation);
|
||||||
blitBuffer(&csr, blitProperties, false, *pDevice);
|
blitBuffer(&csr, blitProperties, false, *pDevice);
|
||||||
auto iter = csr.makeResidentAllocations.find(&clearColorAllocation);
|
auto iter = csr.makeResidentAllocations.find(&clearColorAllocation);
|
||||||
ASSERT_NE(iter, csr.makeResidentAllocations.end());
|
ASSERT_NE(iter, csr.makeResidentAllocations.end());
|
||||||
|
|
|
@ -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);
|
uint32_t compressionFormat = gmmHelper->getClientContext()->getSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT::GMM_FORMAT_GENERIC_8BIT);
|
||||||
|
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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 offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
|
@ -125,9 +125,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenDebugFlagSetWhenCompressionEnabledTh
|
||||||
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getDefaultGmm()->isCompressionEnabled = false;
|
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getDefaultGmm()->isCompressionEnabled = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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 offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferNotCompressed->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
|
@ -176,9 +176,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
|
|
||||||
cl_int retVal = CL_SUCCESS;
|
cl_int retVal = CL_SUCCESS;
|
||||||
auto buffer = clUniquePtr<Buffer>(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
|
auto buffer = clUniquePtr<Buffer>(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
@ -205,9 +205,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
|
|
||||||
cl_int retVal = CL_SUCCESS;
|
cl_int retVal = CL_SUCCESS;
|
||||||
auto buffer = clUniquePtr<Buffer>(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
|
auto buffer = clUniquePtr<Buffer>(Buffer::create(&context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
buffer->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
@ -281,8 +281,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, given2dBlitCommandWhenDispatchingThenSetV
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
{
|
{
|
||||||
// 1D
|
// 1D
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, allocation,
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation,
|
||||||
0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
blitBuffer(csr, blitProperties, false, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, false, clDevice->getDevice());
|
||||||
|
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
|
@ -305,8 +305,8 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, given2dBlitCommandWhenDispatchingThenSetV
|
||||||
|
|
||||||
{
|
{
|
||||||
// 2D
|
// 2D
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(allocation, allocation,
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation,
|
||||||
0, 0, {(2 * BlitterConstants::maxBlitWidth) + 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {(2 * BlitterConstants::maxBlitWidth) + 1, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
blitBuffer(csr, blitProperties, false, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, false, clDevice->getDevice());
|
||||||
|
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
|
@ -339,9 +339,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool()));
|
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool()));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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 offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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()));
|
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool()));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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 offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
@ -452,9 +452,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
|
|
||||||
DebugManager.flags.OverrideBlitterTargetMemory.set(0u);
|
DebugManager.flags.OverrideBlitterTargetMemory.set(0u);
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
@ -470,9 +470,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
DebugManager.flags.OverrideBlitterTargetMemory.set(1u);
|
DebugManager.flags.OverrideBlitterTargetMemory.set(1u);
|
||||||
{
|
{
|
||||||
auto offset = csr->commandStream.getUsed();
|
auto offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
@ -489,9 +489,9 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenBufferWhenProgrammingBltCommandThenS
|
||||||
DebugManager.flags.OverrideBlitterTargetMemory.set(2u);
|
DebugManager.flags.OverrideBlitterTargetMemory.set(2u);
|
||||||
{
|
{
|
||||||
auto offset = csr->commandStream.getUsed();
|
auto offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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()));
|
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex())->getMemoryPool()));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
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 offset = csr->commandStream.getUsed();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForCopyBuffer(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
auto blitProperties = BlitProperties::constructPropertiesForCopy(bufferInLocalPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
bufferInSystemPool->getGraphicsAllocation(clDevice->getRootDeviceIndex()),
|
||||||
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
0, 0, {2048, 1, 1}, 0, 0, 0, 0, csr->getClearColorAllocation());
|
||||||
|
|
||||||
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
blitBuffer(csr, blitProperties, true, clDevice->getDevice());
|
||||||
|
|
||||||
|
|
|
@ -93,10 +93,10 @@ BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants:
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
BlitProperties BlitProperties::constructPropertiesForCopyBuffer(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation,
|
BlitProperties BlitProperties::constructPropertiesForCopy(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation,
|
||||||
Vec3<size_t> dstOffset, Vec3<size_t> srcOffset, Vec3<size_t> copySize,
|
Vec3<size_t> dstOffset, Vec3<size_t> srcOffset, Vec3<size_t> copySize,
|
||||||
size_t srcRowPitch, size_t srcSlicePitch,
|
size_t srcRowPitch, size_t srcSlicePitch,
|
||||||
size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation) {
|
size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation) {
|
||||||
copySize.y = copySize.y ? copySize.y : 1;
|
copySize.y = copySize.y ? copySize.y : 1;
|
||||||
copySize.z = copySize.z ? copySize.z : 1;
|
copySize.z = copySize.z ? copySize.z : 1;
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,10 @@ struct BlitProperties {
|
||||||
size_t hostRowPitch, size_t hostSlicePitch,
|
size_t hostRowPitch, size_t hostSlicePitch,
|
||||||
size_t gpuRowPitch, size_t gpuSlicePitch);
|
size_t gpuRowPitch, size_t gpuSlicePitch);
|
||||||
|
|
||||||
static BlitProperties constructPropertiesForCopyBuffer(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation,
|
static BlitProperties constructPropertiesForCopy(GraphicsAllocation *dstAllocation, GraphicsAllocation *srcAllocation,
|
||||||
Vec3<size_t> dstOffset, Vec3<size_t> srcOffset, Vec3<size_t> copySize,
|
Vec3<size_t> dstOffset, Vec3<size_t> srcOffset, Vec3<size_t> copySize,
|
||||||
size_t srcRowPitch, size_t srcSlicePitch,
|
size_t srcRowPitch, size_t srcSlicePitch,
|
||||||
size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation);
|
size_t dstRowPitch, size_t dstSlicePitch, GraphicsAllocation *clearColorAllocation);
|
||||||
|
|
||||||
static BlitProperties constructPropertiesForAuxTranslation(AuxTranslationDirection auxTranslationDirection,
|
static BlitProperties constructPropertiesForAuxTranslation(AuxTranslationDirection auxTranslationDirection,
|
||||||
GraphicsAllocation *allocation, GraphicsAllocation *clearColorAllocation);
|
GraphicsAllocation *allocation, GraphicsAllocation *clearColorAllocation);
|
||||||
|
|
|
@ -83,9 +83,9 @@ TEST(BlitCommandsHelperTest, GivenBufferParamsWhenConstructingPropertiesForBuffe
|
||||||
size_t dstRowPitch = 2;
|
size_t dstRowPitch = 2;
|
||||||
size_t dstSlicePitch = 3;
|
size_t dstSlicePitch = 3;
|
||||||
|
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc.get(), srcAlloc.get(),
|
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc.get(), srcAlloc.get(),
|
||||||
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
||||||
dstRowPitch, dstSlicePitch, clearColorAllocation.get());
|
dstRowPitch, dstSlicePitch, clearColorAllocation.get());
|
||||||
|
|
||||||
EXPECT_EQ(blitProperties.blitDirection, BlitterConstants::BlitDirection::BufferToBuffer);
|
EXPECT_EQ(blitProperties.blitDirection, BlitterConstants::BlitDirection::BufferToBuffer);
|
||||||
EXPECT_EQ(blitProperties.dstAllocation, dstAlloc.get());
|
EXPECT_EQ(blitProperties.dstAllocation, dstAlloc.get());
|
||||||
|
@ -122,9 +122,9 @@ TEST(BlitCommandsHelperTest, GivenCopySizeYAndZEqual0WhenConstructingPropertiesF
|
||||||
size_t dstRowPitch = 2;
|
size_t dstRowPitch = 2;
|
||||||
size_t dstSlicePitch = 3;
|
size_t dstSlicePitch = 3;
|
||||||
|
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(dstAlloc.get(), srcAlloc.get(),
|
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc.get(), srcAlloc.get(),
|
||||||
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
||||||
dstRowPitch, dstSlicePitch, clearColorAllocation.get());
|
dstRowPitch, dstSlicePitch, clearColorAllocation.get());
|
||||||
Vec3<size_t> expectedSize{copySize.x, 1, 1};
|
Vec3<size_t> expectedSize{copySize.x, 1, 1};
|
||||||
EXPECT_EQ(blitProperties.copySize, expectedSize);
|
EXPECT_EQ(blitProperties.copySize, expectedSize);
|
||||||
}
|
}
|
||||||
|
@ -428,9 +428,9 @@ HWTEST2_F(BlitTests, givenMemoryAndImageWhenDispatchCopyImageCallThenCommandAdde
|
||||||
size_t dstRowPitch = dstSize.x;
|
size_t dstRowPitch = dstSize.x;
|
||||||
size_t dstSlicePitch = dstSize.y;
|
size_t dstSlicePitch = dstSize.y;
|
||||||
|
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopyBuffer(&dstAlloc, &srcAlloc,
|
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(&dstAlloc, &srcAlloc,
|
||||||
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
||||||
dstRowPitch, dstSlicePitch, &clearColorAllocation);
|
dstRowPitch, dstSlicePitch, &clearColorAllocation);
|
||||||
|
|
||||||
uint32_t streamBuffer[100] = {};
|
uint32_t streamBuffer[100] = {};
|
||||||
LinearStream stream(streamBuffer, sizeof(streamBuffer));
|
LinearStream stream(streamBuffer, sizeof(streamBuffer));
|
||||||
|
|
Loading…
Reference in New Issue