mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Use fw declaration of IndirectHeap in CommandContainer
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7dc89fea78
commit
f8c104feaa
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -84,9 +84,9 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommandListImm
|
|||||||
auto completionStamp = this->csr->flushTask(
|
auto completionStamp = this->csr->flushTask(
|
||||||
*commandStream,
|
*commandStream,
|
||||||
commandStreamStart,
|
commandStreamStart,
|
||||||
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::DYNAMIC_STATE)),
|
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::Type::DYNAMIC_STATE)),
|
||||||
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::INDIRECT_OBJECT)),
|
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::Type::INDIRECT_OBJECT)),
|
||||||
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::SURFACE_STATE)),
|
*(this->commandContainer.getIndirectHeap(NEO::IndirectHeap::Type::SURFACE_STATE)),
|
||||||
this->csr->peekTaskLevel(),
|
this->csr->peekTaskLevel(),
|
||||||
dispatchFlags,
|
dispatchFlags,
|
||||||
*(this->device->getNEODevice()));
|
*(this->device->getNEODevice()));
|
||||||
|
|||||||
@@ -726,8 +726,8 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
|||||||
IndirectHeap *dsh = nullptr;
|
IndirectHeap *dsh = nullptr;
|
||||||
IndirectHeap *ioh = nullptr;
|
IndirectHeap *ioh = nullptr;
|
||||||
|
|
||||||
dsh = &getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
dsh = &getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
ioh = &getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
ioh = &getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
|
|
||||||
auto allocNeedsFlushDC = false;
|
auto allocNeedsFlushDC = false;
|
||||||
if (!device->isFullRangeSvm()) {
|
if (!device->isFullRangeSvm()) {
|
||||||
@@ -811,7 +811,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
|||||||
commandStreamStart,
|
commandStreamStart,
|
||||||
*dsh,
|
*dsh,
|
||||||
*ioh,
|
*ioh,
|
||||||
getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
taskLevel,
|
taskLevel,
|
||||||
dispatchFlags,
|
dispatchFlags,
|
||||||
getDevice());
|
getDevice());
|
||||||
@@ -1015,9 +1015,9 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueCommandWithoutKernel(
|
|||||||
completionStamp = getGpgpuCommandStreamReceiver().flushTask(
|
completionStamp = getGpgpuCommandStreamReceiver().flushTask(
|
||||||
*commandStream,
|
*commandStream,
|
||||||
commandStreamStart,
|
commandStreamStart,
|
||||||
getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
taskLevel,
|
taskLevel,
|
||||||
dispatchFlags,
|
dispatchFlags,
|
||||||
getDevice());
|
getDevice());
|
||||||
|
|||||||
@@ -123,9 +123,9 @@ IndirectHeap &getIndirectHeap(CommandQueue &commandQueue, const MultiDispatchInf
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
switch (heapType) {
|
switch (heapType) {
|
||||||
case IndirectHeap::DYNAMIC_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo); break;
|
case IndirectHeap::Type::DYNAMIC_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo); break;
|
||||||
case IndirectHeap::INDIRECT_OBJECT: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo); break;
|
case IndirectHeap::Type::INDIRECT_OBJECT: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo); break;
|
||||||
case IndirectHeap::SURFACE_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(multiDispatchInfo); break;
|
case IndirectHeap::Type::SURFACE_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(multiDispatchInfo); break;
|
||||||
}
|
}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
|||||||
@@ -261,21 +261,21 @@ void HardwareInterface<GfxFamily>::obtainIndirectHeaps(CommandQueue &commandQueu
|
|||||||
|
|
||||||
dshSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
dshSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
|
|
||||||
commandQueue.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, dshSize, dsh);
|
commandQueue.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, dshSize, dsh);
|
||||||
dsh->getSpace(colorCalcSize);
|
dsh->getSpace(colorCalcSize);
|
||||||
|
|
||||||
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE, sshSize, ssh);
|
commandQueue.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, sshSize, ssh);
|
||||||
|
|
||||||
if (iohEqualsDsh) {
|
if (iohEqualsDsh) {
|
||||||
ioh = dsh;
|
ioh = dsh;
|
||||||
} else {
|
} else {
|
||||||
commandQueue.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT,
|
commandQueue.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT,
|
||||||
HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo), ioh);
|
HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo), ioh);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dsh = &getIndirectHeap<GfxFamily, IndirectHeap::DYNAMIC_STATE>(commandQueue, multiDispatchInfo);
|
dsh = &getIndirectHeap<GfxFamily, IndirectHeap::Type::DYNAMIC_STATE>(commandQueue, multiDispatchInfo);
|
||||||
ioh = &getIndirectHeap<GfxFamily, IndirectHeap::INDIRECT_OBJECT>(commandQueue, multiDispatchInfo);
|
ioh = &getIndirectHeap<GfxFamily, IndirectHeap::Type::INDIRECT_OBJECT>(commandQueue, multiDispatchInfo);
|
||||||
ssh = &getIndirectHeap<GfxFamily, IndirectHeap::SURFACE_STATE>(commandQueue, multiDispatchInfo);
|
ssh = &getIndirectHeap<GfxFamily, IndirectHeap::Type::SURFACE_STATE>(commandQueue, multiDispatchInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ CompletionStamp &CommandMapUnmap::submit(uint32_t taskLevel, bool terminated) {
|
|||||||
|
|
||||||
completionStamp = commandStreamReceiver.flushTask(queueCommandStream,
|
completionStamp = commandStreamReceiver.flushTask(queueCommandStream,
|
||||||
offset,
|
offset,
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
taskLevel,
|
taskLevel,
|
||||||
dispatchFlags,
|
dispatchFlags,
|
||||||
commandQueue.getDevice());
|
commandQueue.getDevice());
|
||||||
@@ -387,9 +387,9 @@ CompletionStamp &CommandWithoutKernel::submit(uint32_t taskLevel, bool terminate
|
|||||||
|
|
||||||
completionStamp = commandStreamReceiver.flushTask(*kernelOperation->commandStream,
|
completionStamp = commandStreamReceiver.flushTask(*kernelOperation->commandStream,
|
||||||
0,
|
0,
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
commandQueue.getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
commandQueue.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
taskLevel,
|
taskLevel,
|
||||||
dispatchFlags,
|
dispatchFlags,
|
||||||
commandQueue.getDevice());
|
commandQueue.getDevice());
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubInlineDataTest, givenCrossThreadSize
|
|||||||
cl_event *eventWaitList = nullptr;
|
cl_event *eventWaitList = nullptr;
|
||||||
cl_event *event = nullptr;
|
cl_event *event = nullptr;
|
||||||
|
|
||||||
IndirectHeap &ih = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 2048);
|
IndirectHeap &ih = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 2048);
|
||||||
|
|
||||||
auto retVal = pCmdQ->enqueueKernel(
|
auto retVal = pCmdQ->enqueueKernel(
|
||||||
kernels[3].get(),
|
kernels[3].get(),
|
||||||
|
|||||||
@@ -386,9 +386,9 @@ struct StaticWalkerPartitionFourTilesTests : EnqueueWithWalkerPartitionFourTiles
|
|||||||
dispatchFlags.guardCommandBufferWithPipeControl = true;
|
dispatchFlags.guardCommandBufferWithPipeControl = true;
|
||||||
|
|
||||||
rootCsr->flushTask(stream, 0,
|
rootCsr->flushTask(stream, 0,
|
||||||
rootCsr->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
rootCsr->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
rootCsr->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
rootCsr->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
rootCsr->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
rootCsr->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
0u, dispatchFlags, rootDevice->getDevice());
|
0u, dispatchFlags, rootDevice->getDevice());
|
||||||
|
|
||||||
rootCsr->flushBatchedSubmissions();
|
rootCsr->flushBatchedSubmissions();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -69,9 +69,9 @@ struct MiAtomicAubFixture : public AUBFixture {
|
|||||||
csr->makeResident(*deviceSurface);
|
csr->makeResident(*deviceSurface);
|
||||||
csr->makeResident(*systemSurface);
|
csr->makeResident(*systemSurface);
|
||||||
csr->flushTask(taskStream, 0,
|
csr->flushTask(taskStream, 0,
|
||||||
csr->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
0u, dispatchFlags, device->getDevice());
|
0u, dispatchFlags, device->getDevice());
|
||||||
|
|
||||||
csr->flushBatchedSubmissions();
|
csr->flushBatchedSubmissions();
|
||||||
|
|||||||
@@ -240,9 +240,9 @@ struct AubWalkerPartitionZeroFixture : public AubWalkerPartitionFixture {
|
|||||||
|
|
||||||
csr->makeResident(*helperSurface);
|
csr->makeResident(*helperSurface);
|
||||||
csr->flushTask(*taskStream, 0,
|
csr->flushTask(*taskStream, 0,
|
||||||
csr->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
0u, dispatchFlags, device->getDevice());
|
0u, dispatchFlags, device->getDevice());
|
||||||
|
|
||||||
csr->flushBatchedSubmissions();
|
csr->flushBatchedSubmissions();
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ struct MiMath : public AUBFixture, public ::testing::Test {
|
|||||||
dispatchFlags.guardCommandBufferWithPipeControl = true;
|
dispatchFlags.guardCommandBufferWithPipeControl = true;
|
||||||
|
|
||||||
csr->flushTask(*taskStream, 0,
|
csr->flushTask(*taskStream, 0,
|
||||||
csr->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u),
|
||||||
csr->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
|
csr->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u),
|
||||||
0u, dispatchFlags, device->getDevice());
|
0u, dispatchFlags, device->getDevice());
|
||||||
|
|
||||||
csr->flushBatchedSubmissions();
|
csr->flushBatchedSubmissions();
|
||||||
|
|||||||
@@ -581,9 +581,9 @@ HWTEST_F(BlockedCommandQueueTest, givenCommandQueueWhenBlockedCommandIsBeingSubm
|
|||||||
pCmdQ->enqueueKernel(mockKernel, 1, &offset, &size, &size, 1, &blockedEvent, nullptr);
|
pCmdQ->enqueueKernel(mockKernel, 1, &offset, &size, &size, 1, &blockedEvent, nullptr);
|
||||||
userEvent.setStatus(CL_COMPLETE);
|
userEvent.setStatus(CL_COMPLETE);
|
||||||
|
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 4096u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 4096u);
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 4096u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 4096u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096u);
|
||||||
|
|
||||||
uint32_t defaultSshUse = UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
uint32_t defaultSshUse = UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
||||||
|
|
||||||
@@ -604,9 +604,9 @@ HWTEST_F(BlockedCommandQueueTest, givenCommandQueueWithUsedHeapsWhenBlockedComma
|
|||||||
|
|
||||||
cl_event blockedEvent = &userEvent;
|
cl_event blockedEvent = &userEvent;
|
||||||
|
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 4096u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 4096u);
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 4096u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 4096u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096u);
|
||||||
|
|
||||||
auto spaceToUse = 4u;
|
auto spaceToUse = 4u;
|
||||||
|
|
||||||
@@ -636,9 +636,9 @@ HWTEST_F(BlockedCommandQueueTest, givenCommandQueueWhichHasSomeUnusedHeapsWhenBl
|
|||||||
|
|
||||||
cl_event blockedEvent = &userEvent;
|
cl_event blockedEvent = &userEvent;
|
||||||
|
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 4096u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 4096u);
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 4096u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 4096u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096u);
|
||||||
|
|
||||||
auto iohBase = ioh.getCpuBase();
|
auto iohBase = ioh.getCpuBase();
|
||||||
auto dshBase = dsh.getCpuBase();
|
auto dshBase = dsh.getCpuBase();
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ HWTEST_P(CommandQueueIndirectHeapTest, givenIndirectObjectHeapWhenItIsQueriedFor
|
|||||||
auto &commandStreamReceiver = pClDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &commandStreamReceiver = pClDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), 8192);
|
||||||
if (this->GetParam() == IndirectHeap::INDIRECT_OBJECT && commandStreamReceiver.canUse4GbHeaps) {
|
if (this->GetParam() == IndirectHeap::Type::INDIRECT_OBJECT && commandStreamReceiver.canUse4GbHeaps) {
|
||||||
EXPECT_TRUE(indirectHeap.getGraphicsAllocation()->is32BitAllocation());
|
EXPECT_TRUE(indirectHeap.getGraphicsAllocation()->is32BitAllocation());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_FALSE(indirectHeap.getGraphicsAllocation()->is32BitAllocation());
|
EXPECT_FALSE(indirectHeap.getGraphicsAllocation()->is32BitAllocation());
|
||||||
@@ -588,7 +588,7 @@ HWTEST_P(CommandQueueIndirectHeapTest, GivenIndirectHeapWhenGettingAvailableSpac
|
|||||||
MockCommandQueue cmdQ(context.get(), pClDevice, props, false);
|
MockCommandQueue cmdQ(context.get(), pClDevice, props, false);
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), sizeof(uint32_t));
|
auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), sizeof(uint32_t));
|
||||||
if (this->GetParam() == IndirectHeap::SURFACE_STATE) {
|
if (this->GetParam() == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
size_t expectedSshUse = cmdQ.getGpgpuCommandStreamReceiver().defaultSshSize - MemoryConstants::pageSize - UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
size_t expectedSshUse = cmdQ.getGpgpuCommandStreamReceiver().defaultSshSize - MemoryConstants::pageSize - UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
||||||
EXPECT_EQ(expectedSshUse, indirectHeap.getAvailableSpace());
|
EXPECT_EQ(expectedSshUse, indirectHeap.getAvailableSpace());
|
||||||
} else {
|
} else {
|
||||||
@@ -615,7 +615,7 @@ TEST_P(CommandQueueIndirectHeapTest, WhenGettingIndirectHeapWithNewSizeThenMaxAv
|
|||||||
|
|
||||||
const auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), requiredSize);
|
const auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), requiredSize);
|
||||||
ASSERT_NE(nullptr, &indirectHeap);
|
ASSERT_NE(nullptr, &indirectHeap);
|
||||||
if (this->GetParam() == IndirectHeap::SURFACE_STATE) {
|
if (this->GetParam() == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
//no matter what SSH is always capped
|
//no matter what SSH is always capped
|
||||||
EXPECT_EQ(cmdQ.getGpgpuCommandStreamReceiver().defaultSshSize - MemoryConstants::pageSize,
|
EXPECT_EQ(cmdQ.getGpgpuCommandStreamReceiver().defaultSshSize - MemoryConstants::pageSize,
|
||||||
indirectHeap.getMaxAvailableSpace());
|
indirectHeap.getMaxAvailableSpace());
|
||||||
@@ -653,11 +653,11 @@ HWTEST_P(CommandQueueIndirectHeapTest, givenCommandStreamReceiverWithReusableAll
|
|||||||
|
|
||||||
auto &commandStreamReceiver = pClDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &commandStreamReceiver = pClDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
auto allocationType = GraphicsAllocation::AllocationType::LINEAR_STREAM;
|
auto allocationType = GraphicsAllocation::AllocationType::LINEAR_STREAM;
|
||||||
if (this->GetParam() == IndirectHeap::INDIRECT_OBJECT && commandStreamReceiver.canUse4GbHeaps) {
|
if (this->GetParam() == IndirectHeap::Type::INDIRECT_OBJECT && commandStreamReceiver.canUse4GbHeaps) {
|
||||||
allocationType = GraphicsAllocation::AllocationType::INTERNAL_HEAP;
|
allocationType = GraphicsAllocation::AllocationType::INTERNAL_HEAP;
|
||||||
}
|
}
|
||||||
allocation = memoryManager->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), allocationSize, allocationType, pDevice->getDeviceBitfield()});
|
allocation = memoryManager->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), allocationSize, allocationType, pDevice->getDeviceBitfield()});
|
||||||
if (this->GetParam() == IndirectHeap::SURFACE_STATE) {
|
if (this->GetParam() == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
allocation->setSize(commandStreamReceiver.defaultSshSize * 2);
|
allocation->setSize(commandStreamReceiver.defaultSshSize * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ HWTEST_P(CommandQueueIndirectHeapTest, givenCommandStreamReceiverWithReusableAll
|
|||||||
|
|
||||||
// if we obtain heap from reusable pool, we need to keep the size of allocation
|
// if we obtain heap from reusable pool, we need to keep the size of allocation
|
||||||
// surface state heap is an exception, it is capped at (max_ssh_size_for_HW - page_size)
|
// surface state heap is an exception, it is capped at (max_ssh_size_for_HW - page_size)
|
||||||
if (this->GetParam() == IndirectHeap::SURFACE_STATE) {
|
if (this->GetParam() == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
EXPECT_EQ(commandStreamReceiver.defaultSshSize - MemoryConstants::pageSize, indirectHeap.getMaxAvailableSpace());
|
EXPECT_EQ(commandStreamReceiver.defaultSshSize - MemoryConstants::pageSize, indirectHeap.getMaxAvailableSpace());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(allocationSize, indirectHeap.getMaxAvailableSpace());
|
EXPECT_EQ(allocationSize, indirectHeap.getMaxAvailableSpace());
|
||||||
@@ -797,7 +797,7 @@ HWTEST_P(CommandQueueIndirectHeapTest, givenCommandQueueWhenGetIndirectHeapIsCal
|
|||||||
|
|
||||||
auto heapType = this->GetParam();
|
auto heapType = this->GetParam();
|
||||||
|
|
||||||
bool requireInternalHeap = IndirectHeap::INDIRECT_OBJECT == heapType && commandStreamReceiver.canUse4GbHeaps;
|
bool requireInternalHeap = IndirectHeap::Type::INDIRECT_OBJECT == heapType && commandStreamReceiver.canUse4GbHeaps;
|
||||||
const auto &indirectHeap = cmdQ.getIndirectHeap(heapType, 100);
|
const auto &indirectHeap = cmdQ.getIndirectHeap(heapType, 100);
|
||||||
auto indirectHeapAllocation = indirectHeap.getGraphicsAllocation();
|
auto indirectHeapAllocation = indirectHeap.getGraphicsAllocation();
|
||||||
ASSERT_NE(nullptr, indirectHeapAllocation);
|
ASSERT_NE(nullptr, indirectHeapAllocation);
|
||||||
@@ -839,9 +839,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
Device,
|
Device,
|
||||||
CommandQueueIndirectHeapTest,
|
CommandQueueIndirectHeapTest,
|
||||||
testing::Values(
|
testing::Values(
|
||||||
IndirectHeap::DYNAMIC_STATE,
|
IndirectHeap::Type::DYNAMIC_STATE,
|
||||||
IndirectHeap::INDIRECT_OBJECT,
|
IndirectHeap::Type::INDIRECT_OBJECT,
|
||||||
IndirectHeap::SURFACE_STATE));
|
IndirectHeap::Type::SURFACE_STATE));
|
||||||
|
|
||||||
using CommandQueueTests = ::testing::Test;
|
using CommandQueueTests = ::testing::Test;
|
||||||
HWTEST_F(CommandQueueTests, givenMultipleCommandQueuesWhenMarkerIsEmittedThenGraphicsAllocationIsReused) {
|
HWTEST_F(CommandQueueTests, givenMultipleCommandQueuesWhenMarkerIsEmittedThenGraphicsAllocationIsReused) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -960,7 +960,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, GivenMultipleKernelsWhenDispatch
|
|||||||
MockMultiDispatchInfo multiDispatchInfo(pClDevice, std::vector<Kernel *>({&kernel1, &kernel2}));
|
MockMultiDispatchInfo multiDispatchInfo(pClDevice, std::vector<Kernel *>({&kernel1, &kernel2}));
|
||||||
|
|
||||||
// create Indirect DSH heap
|
// create Indirect DSH heap
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
|
|
||||||
indirectHeap.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
indirectHeap.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
||||||
auto dshBeforeMultiDisptach = indirectHeap.getUsed();
|
auto dshBeforeMultiDisptach = indirectHeap.getUsed();
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
|
|||||||
|
|
||||||
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
|
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
|
||||||
|
|
||||||
IndirectHeap &ih = cmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 2048);
|
IndirectHeap &ih = cmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 2048);
|
||||||
|
|
||||||
auto &kd = kernel->kernelInfo.kernelDescriptor;
|
auto &kd = kernel->kernelInfo.kernelDescriptor;
|
||||||
kd.kernelAttributes.flags.passInlineData = true;
|
kd.kernelAttributes.flags.passInlineData = true;
|
||||||
@@ -874,7 +874,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
|
|||||||
DebugManager.flags.EnableHwGenerationLocalIds.set(false);
|
DebugManager.flags.EnableHwGenerationLocalIds.set(false);
|
||||||
|
|
||||||
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
|
auto cmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context.get(), device.get(), nullptr);
|
||||||
IndirectHeap &ih = cmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 2048);
|
IndirectHeap &ih = cmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 2048);
|
||||||
|
|
||||||
auto &kd = kernel->kernelInfo.kernelDescriptor;
|
auto &kd = kernel->kernelInfo.kernelDescriptor;
|
||||||
kd.kernelAttributes.flags.passInlineData = true;
|
kd.kernelAttributes.flags.passInlineData = true;
|
||||||
@@ -1445,7 +1445,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenEnqueueIsB
|
|||||||
|
|
||||||
HardwareParse hwParser;
|
HardwareParse hwParser;
|
||||||
hwParser.parseCommands<FamilyType>(*cmdQ->getUltCommandStreamReceiver().lastFlushedCommandStream);
|
hwParser.parseCommands<FamilyType>(*cmdQ->getUltCommandStreamReceiver().lastFlushedCommandStream);
|
||||||
hwParser.findHardwareCommands<FamilyType>(&cmdQ->getGpgpuCommandStreamReceiver().getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0));
|
hwParser.findHardwareCommands<FamilyType>(&cmdQ->getGpgpuCommandStreamReceiver().getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0));
|
||||||
auto computeWalker = reinterpret_cast<typename FamilyType::COMPUTE_WALKER *>(hwParser.cmdWalker);
|
auto computeWalker = reinterpret_cast<typename FamilyType::COMPUTE_WALKER *>(hwParser.cmdWalker);
|
||||||
ASSERT_NE(nullptr, computeWalker);
|
ASSERT_NE(nullptr, computeWalker);
|
||||||
EXPECT_EQ(FamilyType::COMPUTE_WALKER::PARTITION_TYPE::PARTITION_TYPE_Y, computeWalker->getPartitionType());
|
EXPECT_EQ(FamilyType::COMPUTE_WALKER::PARTITION_TYPE::PARTITION_TYPE_Y, computeWalker->getPartitionType());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -374,9 +374,9 @@ HWTEST_F(DispatchFlagsTests, givenMockKernelWhenSettingAdditionalKernelExecInfoT
|
|||||||
|
|
||||||
std::unique_ptr<PrintfHandler> printfHandler(PrintfHandler::create(multiDispatchInfo, *device.get()));
|
std::unique_ptr<PrintfHandler> printfHandler(PrintfHandler::create(multiDispatchInfo, *device.get()));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
std::vector<Surface *> v;
|
std::vector<Surface *> v;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -46,9 +46,9 @@ HWTEST2_F(DispatchFlagsTests, whenSubmittingKernelWithAdditionalKernelExecInfoTh
|
|||||||
|
|
||||||
std::unique_ptr<PrintfHandler> printfHandler(PrintfHandler::create(multiDispatchInfo, *device.get()));
|
std::unique_ptr<PrintfHandler> printfHandler(PrintfHandler::create(multiDispatchInfo, *device.get()));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
std::vector<Surface *> v;
|
std::vector<Surface *> v;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -331,7 +331,7 @@ HWTEST_F(EnqueueCopyBufferTest, WhenCopyingBufferThenArgumentZeroMatchesSourceAd
|
|||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
// Determine where the argument is
|
// Determine where the argument is
|
||||||
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 0u, pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 0u, pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
||||||
|
|
||||||
EXPECT_EQ(reinterpret_cast<void *>(srcBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
EXPECT_EQ(reinterpret_cast<void *>(srcBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ HWTEST_F(EnqueueCopyBufferTest, WhenCopyingBufferThenArgumentOneMatchesDestinati
|
|||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
// Determine where the argument is
|
// Determine where the argument is
|
||||||
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 1u, pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 1u, pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
||||||
|
|
||||||
EXPECT_EQ(reinterpret_cast<void *>(dstBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
EXPECT_EQ(reinterpret_cast<void *>(dstBuffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ HWTEST_F(EnqueueCopyBufferToImageTest, WhenCopyingBufferToImageThenSurfaceStateI
|
|||||||
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
||||||
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(1).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(1).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
||||||
|
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), index);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), index);
|
||||||
const auto &imageDesc = dstImage->getImageDesc();
|
const auto &imageDesc = dstImage->getImageDesc();
|
||||||
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
||||||
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ HWTEST_F(EnqueueCopyImageTest, WhenCopyingImageThenSurfaceStateIsCorrect) {
|
|||||||
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
||||||
for (uint32_t i = 0; i < 2; ++i) {
|
for (uint32_t i = 0; i < 2; ++i) {
|
||||||
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(i).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(i).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), index);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), index);
|
||||||
const auto &imageDesc = dstImage->getImageDesc();
|
const auto &imageDesc = dstImage->getImageDesc();
|
||||||
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
||||||
EXPECT_EQ(imageDesc.image_height, surfaceState.getHeight());
|
EXPECT_EQ(imageDesc.image_height, surfaceState.getHeight());
|
||||||
@@ -196,11 +196,11 @@ HWTEST_F(EnqueueCopyImageTest, WhenCopyingImageThenSurfaceStateIsCorrect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t srcIndex = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(0).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
uint32_t srcIndex = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(0).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
||||||
const auto &srcSurfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), srcIndex);
|
const auto &srcSurfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), srcIndex);
|
||||||
EXPECT_EQ(srcImage->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress(), srcSurfaceState.getSurfaceBaseAddress());
|
EXPECT_EQ(srcImage->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress(), srcSurfaceState.getSurfaceBaseAddress());
|
||||||
|
|
||||||
uint32_t dstIndex = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(1).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
uint32_t dstIndex = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(1).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
||||||
const auto &dstSurfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), dstIndex);
|
const auto &dstSurfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), dstIndex);
|
||||||
EXPECT_EQ(dstImage->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress(), dstSurfaceState.getSurfaceBaseAddress());
|
EXPECT_EQ(dstImage->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress(), dstSurfaceState.getSurfaceBaseAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ HWTEST_F(EnqueueCopyImageToBufferTest, WhenCopyingImageToBufferThenSurfaceStateI
|
|||||||
|
|
||||||
enqueueCopyImageToBuffer<FamilyType>();
|
enqueueCopyImageToBuffer<FamilyType>();
|
||||||
|
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), 0);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), 0);
|
||||||
const auto &imageDesc = srcImage->getImageDesc();
|
const auto &imageDesc = srcImage->getImageDesc();
|
||||||
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
||||||
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -100,7 +100,7 @@ HWTEST_F(EnqueueDebugKernelTest, givenDebugKernelWhenEnqueuedThenSSHAndBtiAreCor
|
|||||||
std::unique_ptr<MockCommandQueueHw<FamilyType>> mockCmdQ(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
std::unique_ptr<MockCommandQueueHw<FamilyType>> mockCmdQ(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||||
|
|
||||||
size_t gws[] = {1, 1, 1};
|
size_t gws[] = {1, 1, 1};
|
||||||
auto &ssh = mockCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096u);
|
auto &ssh = mockCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096u);
|
||||||
void *surfaceStates = ssh.getSpace(0);
|
void *surfaceStates = ssh.getSpace(0);
|
||||||
|
|
||||||
mockCmdQ->enqueueKernel(debugKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
mockCmdQ->enqueueKernel(debugKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||||
@@ -125,7 +125,7 @@ HWTEST_F(EnqueueDebugKernelTest, givenDebugKernelWhenEnqueuedThenSurfaceStateFor
|
|||||||
std::unique_ptr<MockCommandQueueHw<FamilyType>> mockCmdQ(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
std::unique_ptr<MockCommandQueueHw<FamilyType>> mockCmdQ(new MockCommandQueueHw<FamilyType>(&context, pClDevice, 0));
|
||||||
|
|
||||||
size_t gws[] = {1, 1, 1};
|
size_t gws[] = {1, 1, 1};
|
||||||
auto &ssh = mockCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096u);
|
auto &ssh = mockCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096u);
|
||||||
mockCmdQ->enqueueKernel(debugKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
mockCmdQ->enqueueKernel(debugKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||||
|
|
||||||
auto debugSurfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(ssh.getCpuBase());
|
auto debugSurfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(ssh.getCpuBase());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -304,7 +304,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, WhenFillingBufferThenArgumentZeroShouldMatch
|
|||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
// Determine where the argument is
|
// Determine where the argument is
|
||||||
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 0u, pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 0u, pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
||||||
|
|
||||||
EXPECT_EQ((void *)((uintptr_t)buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
EXPECT_EQ((void *)((uintptr_t)buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()), *pArgument);
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, WhenFillingBufferThenArgumentTwoShouldMatchP
|
|||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
// Determine where the argument is
|
// Determine where the argument is
|
||||||
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 2u, pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
auto pArgument = (void **)getStatelessArgumentPointer<FamilyType>(kernel->getKernelInfo(), 2u, pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0), rootDeviceIndex);
|
||||||
EXPECT_NE(nullptr, *pArgument);
|
EXPECT_NE(nullptr, *pArgument);
|
||||||
|
|
||||||
context.getMemoryManager()->freeGraphicsMemory(patternAllocation);
|
context.getMemoryManager()->freeGraphicsMemory(patternAllocation);
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ HWTEST_F(EnqueueFillImageTest, WhenFillingImageThenSurfaceStateIsCorrect) {
|
|||||||
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
const auto &kernelInfo = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo();
|
||||||
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(0).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
uint32_t index = static_cast<uint32_t>(kernelInfo.getArgDescriptorAt(0).template as<ArgDescImage>().bindful) / sizeof(RENDER_SURFACE_STATE);
|
||||||
|
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), index);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), index);
|
||||||
const auto &imageDesc = image->getImageDesc();
|
const auto &imageDesc = image->getImageDesc();
|
||||||
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
EXPECT_EQ(imageDesc.image_width, surfaceState.getWidth());
|
||||||
EXPECT_EQ(imageDesc.image_height, surfaceState.getHeight());
|
EXPECT_EQ(imageDesc.image_height, surfaceState.getHeight());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -668,7 +668,7 @@ HWTEST_F(EnqueueHandlerTest, givenKernelUsingSyncBufferWhenEnqueuingKernelThenSs
|
|||||||
auto mockCmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
auto mockCmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||||
mockCmdQ->enqueueKernel(kernel, 1, &offset, &size, &size, 0, nullptr, nullptr);
|
mockCmdQ->enqueueKernel(kernel, 1, &offset, &size, &size, 0, nullptr, nullptr);
|
||||||
|
|
||||||
sshUsageWithoutSyncBuffer = mockCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0).getUsed();
|
sshUsageWithoutSyncBuffer = mockCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0).getUsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -687,7 +687,7 @@ HWTEST_F(EnqueueHandlerTest, givenKernelUsingSyncBufferWhenEnqueuingKernelThenSs
|
|||||||
auto mockCmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
auto mockCmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(context, pClDevice, 0));
|
||||||
mockCmdQ->enqueueKernel(kernel, 1, &offset, &size, &size, 0, nullptr, nullptr);
|
mockCmdQ->enqueueKernel(kernel, 1, &offset, &size, &size, 0, nullptr, nullptr);
|
||||||
|
|
||||||
auto &surfaceStateHeap = mockCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0);
|
auto &surfaceStateHeap = mockCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0);
|
||||||
EXPECT_EQ(sshUsageWithoutSyncBuffer + kernelInternals.kernelInfo.heapInfo.SurfaceStateHeapSize, surfaceStateHeap.getUsed());
|
EXPECT_EQ(sshUsageWithoutSyncBuffer + kernelInternals.kernelInfo.heapInfo.SurfaceStateHeapSize, surfaceStateHeap.getUsed());
|
||||||
|
|
||||||
ClHardwareParse hwParser;
|
ClHardwareParse hwParser;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -576,7 +576,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
|||||||
auto &kernelInfo = kernel->getKernelInfo();
|
auto &kernelInfo = kernel->getKernelInfo();
|
||||||
|
|
||||||
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
||||||
const auto &surfaceStateDst = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), 1);
|
const auto &surfaceStateDst = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), 1);
|
||||||
|
|
||||||
if (kernelInfo.getArgDescriptorAt(1).as<ArgDescPointer>().pointerSize == sizeof(uint64_t)) {
|
if (kernelInfo.getArgDescriptorAt(1).as<ArgDescPointer>().pointerSize == sizeof(uint64_t)) {
|
||||||
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ HWTEST_F(EnqueueReadImageTest, WhenReadingImageThenSurfaceStateIsCorrect) {
|
|||||||
|
|
||||||
// BufferToImage kernel uses BTI=1 for destSurface
|
// BufferToImage kernel uses BTI=1 for destSurface
|
||||||
uint32_t bindingTableIndex = 0;
|
uint32_t bindingTableIndex = 0;
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), bindingTableIndex);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), bindingTableIndex);
|
||||||
|
|
||||||
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
// EnqueueReadImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
||||||
const auto &imageDesc = srcImage->getImageDesc();
|
const auto &imageDesc = srcImage->getImageDesc();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -574,7 +574,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
|||||||
auto &kernelInfo = kernel->getKernelInfo();
|
auto &kernelInfo = kernel->getKernelInfo();
|
||||||
|
|
||||||
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), 0);
|
const auto &surfaceState = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), 0);
|
||||||
|
|
||||||
if (kernelInfo.getArgDescriptorAt(0).as<ArgDescPointer>().pointerSize == sizeof(uint64_t)) {
|
if (kernelInfo.getArgDescriptorAt(0).as<ArgDescPointer>().pointerSize == sizeof(uint64_t)) {
|
||||||
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ HWTEST_F(EnqueueWriteImageTest, WhenWritingImageThenSurfaceStateIsProgrammedCorr
|
|||||||
|
|
||||||
auto index = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo().getArgDescriptorAt(1).template as<ArgDescImage>().bindful / sizeof(RENDER_SURFACE_STATE);
|
auto index = mockCmdQ->storedMultiDispatchInfo.begin()->getKernel()->getKernelInfo().getArgDescriptorAt(1).template as<ArgDescImage>().bindful / sizeof(RENDER_SURFACE_STATE);
|
||||||
|
|
||||||
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), static_cast<uint32_t>(index));
|
const auto &surfaceState = getSurfaceState<FamilyType>(&pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), static_cast<uint32_t>(index));
|
||||||
|
|
||||||
// EnqueueWriteImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
// EnqueueWriteImage uses multi-byte copies depending on per-pixel-size-in-bytes
|
||||||
const auto &imageDesc = dstImage->getImageDesc();
|
const auto &imageDesc = dstImage->getImageDesc();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -67,9 +67,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenFillingBufferThenHeapsAndCommandBufferCo
|
|||||||
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -121,9 +121,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenCopyingBufferThenHeapsAndCommandBufferCo
|
|||||||
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -174,9 +174,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenReadingBufferNonBlockingThenHeapsAndComm
|
|||||||
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -228,9 +228,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenReadingBufferBlockingThenThenHeapsAndCom
|
|||||||
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -283,9 +283,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferNonBlockingThenHeapsAndComm
|
|||||||
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
typedef typename FamilyType::WALKER_TYPE GPGPU_WALKER;
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -334,9 +334,9 @@ HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferNonBlockingThenHeapsAndComm
|
|||||||
HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredBufferTest, WhenWritingBufferBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -61,9 +61,9 @@ struct GetSizeRequiredImageTest : public CommandEnqueueFixture,
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenCopyingImageThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenCopyingImageThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -112,9 +112,9 @@ HWTEST_F(GetSizeRequiredImageTest, WhenCopyingImageThenHeapsAndCommandBufferCons
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenCopyingReadWriteImageThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenCopyingReadWriteImageThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -159,9 +159,9 @@ HWTEST_F(GetSizeRequiredImageTest, WhenCopyingReadWriteImageThenHeapsAndCommandB
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageNonBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageNonBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -214,9 +214,9 @@ HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageNonBlockingThenHeapsAndComman
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -269,9 +269,9 @@ HWTEST_F(GetSizeRequiredImageTest, WhenReadingImageBlockingThenHeapsAndCommandBu
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenWritingImageNonBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenWritingImageNonBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
@@ -324,9 +324,9 @@ HWTEST_F(GetSizeRequiredImageTest, WhenWritingImageNonBlockingThenHeapsAndComman
|
|||||||
HWTEST_F(GetSizeRequiredImageTest, WhenWritingImageBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
HWTEST_F(GetSizeRequiredImageTest, WhenWritingImageBlockingThenHeapsAndCommandBufferConsumedMinimumRequiredSize) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
auto &dsh = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -22,9 +22,9 @@ struct GetSizeRequiredTest : public CommandEnqueueFixture,
|
|||||||
|
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
CommandEnqueueFixture::SetUp();
|
CommandEnqueueFixture::SetUp();
|
||||||
dsh = &pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u);
|
dsh = &pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0u);
|
||||||
ioh = &pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
|
ioh = &pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 0u);
|
||||||
ssh = &pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
|
ssh = &pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0u);
|
||||||
|
|
||||||
usedBeforeDSH = dsh->getUsed();
|
usedBeforeDSH = dsh->getUsed();
|
||||||
usedBeforeIOH = ioh->getUsed();
|
usedBeforeIOH = ioh->getUsed();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -68,7 +68,7 @@ struct OOMCommandQueueBufferTest : public MemoryManagementFixture,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oomSetting.oomISH) {
|
if (oomSetting.oomISH) {
|
||||||
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, oomSize);
|
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, oomSize);
|
||||||
|
|
||||||
// IndirectHeap may be larger than requested so grab what wasnt requested
|
// IndirectHeap may be larger than requested so grab what wasnt requested
|
||||||
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
||||||
@@ -96,7 +96,7 @@ HWTEST_P(OOMCommandQueueBufferTest, WhenCopyingBufferThenMaxAvailableSpaceIsNotE
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ HWTEST_P(OOMCommandQueueBufferTest, WhenFillingBufferThenMaxAvailableSpaceIsNotE
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ HWTEST_P(OOMCommandQueueBufferTest, WhenReadingBufferThenMaxAvailableSpaceIsNotE
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ HWTEST_P(OOMCommandQueueBufferTest, WhenWritingBufferThenMaxAvailableSpaceIsNotE
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ HWTEST_P(OOMCommandQueueBufferTest, WhenWritingBufferRectThenMaxAvailableSpaceIs
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ HWTEST_P(OOMCommandQueueBufferTest, GivenHelloWorldWhenEnqueingKernelThenMaxAvai
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ HWTEST_P(OOMCommandQueueBufferTest, GivenSimpleArgWhenEnqueingKernelThenMaxAvail
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -56,7 +56,7 @@ struct OOMCommandQueueImageTest : public ClDeviceFixture,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oomSetting.oomISH) {
|
if (oomSetting.oomISH) {
|
||||||
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, oomSize);
|
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, oomSize);
|
||||||
|
|
||||||
// IndirectHeap may be larger than requested so grab what wasnt requested
|
// IndirectHeap may be larger than requested so grab what wasnt requested
|
||||||
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
||||||
@@ -85,7 +85,7 @@ HWTEST_P(OOMCommandQueueImageTest, WhenCopyingImageThenMaxAvailableSpaceIsNotExc
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ HWTEST_P(OOMCommandQueueImageTest, WhenFillingImageThenMaxAvailableSpaceIsNotExc
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ HWTEST_P(OOMCommandQueueImageTest, WhenReadingImageThenMaxAvailableSpaceIsNotExc
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ HWTEST_P(OOMCommandQueueImageTest, WhenWritingImageThenMaxAvailableSpaceIsNotExc
|
|||||||
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(context, pClDevice, 0, false);
|
||||||
|
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -51,7 +51,7 @@ struct OOMCommandQueueTest : public ClDeviceFixture,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oomSetting.oomISH) {
|
if (oomSetting.oomISH) {
|
||||||
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, oomSize);
|
auto &ish = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, oomSize);
|
||||||
|
|
||||||
// IndirectHeap may be larger than requested so grab what wasnt requested
|
// IndirectHeap may be larger than requested so grab what wasnt requested
|
||||||
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
ish.getSpace(ish.getAvailableSpace() - oomSize);
|
||||||
@@ -70,7 +70,7 @@ struct OOMCommandQueueTest : public ClDeviceFixture,
|
|||||||
|
|
||||||
HWTEST_P(OOMCommandQueueTest, WhenFinishingThenMaxAvailableSpaceIsNotExceeded) {
|
HWTEST_P(OOMCommandQueueTest, WhenFinishingThenMaxAvailableSpaceIsNotExceeded) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ HWTEST_P(OOMCommandQueueTest, WhenFinishingThenMaxAvailableSpaceIsNotExceeded) {
|
|||||||
|
|
||||||
HWTEST_P(OOMCommandQueueTest, WhenEnqueingMarkerThenMaxAvailableSpaceIsNotExceeded) {
|
HWTEST_P(OOMCommandQueueTest, WhenEnqueingMarkerThenMaxAvailableSpaceIsNotExceeded) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ HWTEST_P(OOMCommandQueueTest, WhenEnqueingMarkerThenMaxAvailableSpaceIsNotExceed
|
|||||||
|
|
||||||
HWTEST_P(OOMCommandQueueTest, WhenEnqueingBarrierThenMaxAvailableSpaceIsNotExceeded) {
|
HWTEST_P(OOMCommandQueueTest, WhenEnqueingBarrierThenMaxAvailableSpaceIsNotExceeded) {
|
||||||
auto &commandStream = pCmdQ->getCS(1024);
|
auto &commandStream = pCmdQ->getCS(1024);
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeISH = indirectHeap.getUsed();
|
auto usedBeforeISH = indirectHeap.getUsed();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -101,7 +101,7 @@ TEST_F(CommandStreamReceiverMultiRootDeviceTest, WhenCreatingCommandStreamGraphi
|
|||||||
EXPECT_EQ(expectedRootDeviceIndex, debugSurface->getRootDeviceIndex());
|
EXPECT_EQ(expectedRootDeviceIndex, debugSurface->getRootDeviceIndex());
|
||||||
|
|
||||||
// Indirect heaps
|
// Indirect heaps
|
||||||
IndirectHeap::Type heapTypes[]{IndirectHeap::DYNAMIC_STATE, IndirectHeap::INDIRECT_OBJECT, IndirectHeap::SURFACE_STATE};
|
IndirectHeap::Type heapTypes[]{IndirectHeap::Type::DYNAMIC_STATE, IndirectHeap::Type::INDIRECT_OBJECT, IndirectHeap::Type::SURFACE_STATE};
|
||||||
for (auto heapType : heapTypes) {
|
for (auto heapType : heapTypes) {
|
||||||
IndirectHeap *heap = nullptr;
|
IndirectHeap *heap = nullptr;
|
||||||
commandStreamReceiver->allocateHeapMemory(heapType, MemoryConstants::pageSize, heap);
|
commandStreamReceiver->allocateHeapMemory(heapType, MemoryConstants::pageSize, heap);
|
||||||
|
|||||||
@@ -1768,9 +1768,9 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelWhenItIsUnblocke
|
|||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
|
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
|
|
||||||
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -88,9 +88,9 @@ TEST(EventBuilder, givenVirtualEventWithCommandThenFinalizeAddChild) {
|
|||||||
MockKernelWithInternals kernel(*device);
|
MockKernelWithInternals kernel(*device);
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
|
|
||||||
std::vector<Surface *> surfaces;
|
std::vector<Surface *> surfaces;
|
||||||
@@ -138,9 +138,9 @@ TEST(EventBuilder, givenVirtualEventWithSubmittedCommandAsParentThenFinalizeNotA
|
|||||||
MockKernelWithInternals kernel(*device);
|
MockKernelWithInternals kernel(*device);
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
|
|
||||||
std::vector<Surface *> surfaces;
|
std::vector<Surface *> surfaces;
|
||||||
|
|||||||
@@ -486,9 +486,9 @@ TEST_F(InternalsEventTest, GivenSubmitCommandFalseWhenSubmittingCommandsThenRefA
|
|||||||
|
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), true, 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, false, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), true, 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, false, pDevice->getDeviceBitfield()}));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
|
|
||||||
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *cmdQ.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *cmdQ.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
@@ -538,9 +538,9 @@ TEST_F(InternalsEventTest, GivenSubmitCommandTrueWhenSubmittingCommandsThenRefAp
|
|||||||
|
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
|
|
||||||
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *cmdQ.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *cmdQ.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
@@ -573,9 +573,9 @@ TEST_F(InternalsEventTest, givenBlockedKernelWithPrintfWhenSubmittedThenPrintOut
|
|||||||
|
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
mockCmdQueue.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
mockCmdQueue.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
mockCmdQueue.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
mockCmdQueue.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
mockCmdQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
mockCmdQueue.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
|
|
||||||
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *mockCmdQueue.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *mockCmdQueue.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
@@ -1025,9 +1025,9 @@ HWTEST_F(EventTest, givenVirtualEventWhenCommandSubmittedThenLockCsrOccurs) {
|
|||||||
MockKernelWithInternals kernel(*pClDevice);
|
MockKernelWithInternals kernel(*pClDevice);
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
|
|
||||||
std::vector<Surface *> surfaces;
|
std::vector<Surface *> surfaces;
|
||||||
@@ -1570,9 +1570,9 @@ HWTEST_F(InternalsEventTest, givenAbortedCommandWhenSubmitCalledThenDontUpdateFl
|
|||||||
|
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 4096u, ioh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 4096u, ioh);
|
||||||
pCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
pCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto blockedCommandsData = std::make_unique<KernelOperation>(cmdStream, *pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
blockedCommandsData->setHeaps(dsh, ioh, ssh);
|
||||||
PreemptionMode preemptionMode = pDevice->getPreemptionMode();
|
PreemptionMode preemptionMode = pDevice->getPreemptionMode();
|
||||||
|
|||||||
@@ -2361,9 +2361,9 @@ HWTEST_F(GTPinTests, givenGtPinInitializedWhenSubmittingKernelCommandThenFlushed
|
|||||||
EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin);
|
EXPECT_EQ(GTPIN_DI_SUCCESS, retFromGtPin);
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 128, ih1);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 128, ih1);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 128, ih2);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 128, ih2);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 128, ih3);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 128, ih3);
|
||||||
|
|
||||||
PreemptionMode preemptionMode = pDevice->getPreemptionMode();
|
PreemptionMode preemptionMode = pDevice->getPreemptionMode();
|
||||||
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 128, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties({pDevice->getRootDeviceIndex(), 128, GraphicsAllocation::AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()}));
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenProgramInterfaceDescriptor
|
|||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto usedIndirectHeapBefore = indirectHeap.getUsed();
|
auto usedIndirectHeapBefore = indirectHeap.getUsed();
|
||||||
indirectHeap.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
indirectHeap.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ HWTEST_F(HardwareCommandsTest, WhenCrossThreadDataIsCreatedThenOnlyRequiredSpace
|
|||||||
auto kernel = multiDispatchInfo.begin()->getKernel();
|
auto kernel = multiDispatchInfo.begin()->getKernel();
|
||||||
ASSERT_NE(nullptr, kernel);
|
ASSERT_NE(nullptr, kernel);
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto usedBefore = indirectHeap.getUsed();
|
auto usedBefore = indirectHeap.getUsed();
|
||||||
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
||||||
HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
@@ -181,7 +181,7 @@ HWTEST_F(HardwareCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoComme
|
|||||||
|
|
||||||
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
|
|
||||||
PatchInfoData patchInfoData = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
PatchInfoData patchInfoData = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
||||||
kernel->getPatchInfoDataList().push_back(patchInfoData);
|
kernel->getPatchInfoDataList().push_back(patchInfoData);
|
||||||
@@ -247,7 +247,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenSendCrossThreadDataWhenWh
|
|||||||
|
|
||||||
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
indirectHeap.getSpace(128u);
|
indirectHeap.getSpace(128u);
|
||||||
|
|
||||||
PatchInfoData patchInfoData1 = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
PatchInfoData patchInfoData1 = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
||||||
@@ -313,9 +313,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenAllocatingIndirectStateRes
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
auto usedBeforeCS = commandStream.getUsed();
|
auto usedBeforeCS = commandStream.getUsed();
|
||||||
auto usedBeforeDSH = dsh.getUsed();
|
auto usedBeforeDSH = dsh.getUsed();
|
||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
@@ -379,9 +379,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenKernelWithFourBindingTabl
|
|||||||
auto expectedBindingTableCount = 3u;
|
auto expectedBindingTableCount = 3u;
|
||||||
mockKernelWithInternal->mockKernel->numberOfBindingTableStates = expectedBindingTableCount;
|
mockKernelWithInternal->mockKernel->numberOfBindingTableStates = expectedBindingTableCount;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
@@ -425,9 +425,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenKernelWith100BindingTable
|
|||||||
auto expectedBindingTableCount = 100u;
|
auto expectedBindingTableCount = 100u;
|
||||||
mockKernelWithInternal->mockKernel->numberOfBindingTableStates = expectedBindingTableCount;
|
mockKernelWithInternal->mockKernel->numberOfBindingTableStates = expectedBindingTableCount;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
@@ -491,9 +491,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, whenSendingIndirectStateThenKe
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
dsh.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
dsh.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
||||||
size_t IDToffset = dsh.getUsed();
|
size_t IDToffset = dsh.getUsed();
|
||||||
@@ -582,9 +582,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenSendingIndirectStateThenBi
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
auto sshUsed = ssh.getUsed();
|
auto sshUsed = ssh.getUsed();
|
||||||
|
|
||||||
@@ -692,9 +692,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenGettingBindingTableStateTh
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
// Initialize binding table state pointers with pattern
|
// Initialize binding table state pointers with pattern
|
||||||
EXPECT_EQ(numSurfaces, pKernel->getNumberOfBindingTableStates());
|
EXPECT_EQ(numSurfaces, pKernel->getNumberOfBindingTableStates());
|
||||||
@@ -770,7 +770,7 @@ HWTEST_F(HardwareCommandsTest, GivenBuffersNotRequiringSshWhenSettingBindingTabl
|
|||||||
ASSERT_EQ(CL_SUCCESS, pKernel->initialize());
|
ASSERT_EQ(CL_SUCCESS, pKernel->initialize());
|
||||||
|
|
||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
ssh.align(8);
|
ssh.align(8);
|
||||||
auto usedBefore = ssh.getUsed();
|
auto usedBefore = ssh.getUsed();
|
||||||
@@ -813,7 +813,7 @@ HWTEST_F(HardwareCommandsTest, GivenZeroSurfaceStatesWhenSettingBindingTableStat
|
|||||||
ASSERT_EQ(CL_SUCCESS, pKernel->initialize());
|
ASSERT_EQ(CL_SUCCESS, pKernel->initialize());
|
||||||
|
|
||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
// Initialize binding table state pointers with pattern
|
// Initialize binding table state pointers with pattern
|
||||||
auto numSurfaceStates = pKernel->getNumberOfBindingTableStates();
|
auto numSurfaceStates = pKernel->getNumberOfBindingTableStates();
|
||||||
@@ -841,9 +841,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, GivenKernelWithInvalidSamplerS
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
@@ -913,9 +913,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, GivenKernelWithSamplersWhenInd
|
|||||||
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
*pWalkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
const uint32_t samplerTableOffset = 64;
|
const uint32_t samplerTableOffset = 64;
|
||||||
const uint32_t samplerStateSize = sizeof(SAMPLER_STATE) * 2;
|
const uint32_t samplerStateSize = sizeof(SAMPLER_STATE) * 2;
|
||||||
@@ -1285,9 +1285,9 @@ HWTEST_F(HardwareCommandsImplicitArgsTests, givenKernelWithImplicitArgsWhenSendi
|
|||||||
auto &commandStream = cmdQ.getCS(1024);
|
auto &commandStream = cmdQ.getCS(1024);
|
||||||
auto pWalkerCmd = reinterpret_cast<typename FamilyType::WALKER_TYPE *>(commandStream.getSpace(0));
|
auto pWalkerCmd = reinterpret_cast<typename FamilyType::WALKER_TYPE *>(commandStream.getSpace(0));
|
||||||
|
|
||||||
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
dsh.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
dsh.align(EncodeStates<FamilyType>::alignInterfaceDescriptorData);
|
||||||
auto interfaceDescriptor = reinterpret_cast<typename FamilyType::INTERFACE_DESCRIPTOR_DATA *>(dsh.getSpace(0));
|
auto interfaceDescriptor = reinterpret_cast<typename FamilyType::INTERFACE_DESCRIPTOR_DATA *>(dsh.getSpace(0));
|
||||||
@@ -1379,7 +1379,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HardwareCommandsTestXeHpAndLater, givenSendCrossThr
|
|||||||
|
|
||||||
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
std::unique_ptr<MockKernel> kernel(new MockKernel(&program, *kernelInfo, *pClDevice));
|
||||||
|
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 8192);
|
||||||
indirectHeap.getSpace(128u);
|
indirectHeap.getSpace(128u);
|
||||||
|
|
||||||
PatchInfoData patchInfoData1 = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
PatchInfoData patchInfoData1 = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -102,9 +102,9 @@ TEST(CommandTest, givenWaitlistRequestWhenCommandComputeKernelIsCreatedThenMakeL
|
|||||||
MockKernelWithInternals kernel(*device);
|
MockKernelWithInternals kernel(*device);
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
|
|
||||||
std::vector<Surface *> surfaces;
|
std::vector<Surface *> surfaces;
|
||||||
@@ -135,9 +135,9 @@ TEST(KernelOperationDestruction, givenKernelOperationWhenItIsDestructedThenAllAl
|
|||||||
auto &allocationsForReuse = allocationStorage.getAllocationsForReuse();
|
auto &allocationsForReuse = allocationStorage.getAllocationsForReuse();
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
cmdQ.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
cmdQ.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
|
|
||||||
auto &heapAllocation1 = *ih1->getGraphicsAllocation();
|
auto &heapAllocation1 = *ih1->getGraphicsAllocation();
|
||||||
@@ -212,9 +212,9 @@ HWTEST_F(DispatchFlagsTests, givenCommandComputeKernelWhenSubmitThenPassCorrectD
|
|||||||
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
|
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
@@ -260,9 +260,9 @@ HWTEST_F(DispatchFlagsTests, givenClCommandCopyImageWhenSubmitThenFlushTextureCa
|
|||||||
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
|
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
@@ -313,9 +313,9 @@ HWTEST_F(DispatchFlagsTests, givenCommandWithoutKernelWhenSubmitThenPassCorrectD
|
|||||||
mockCmdQ->timestampPacketContainer = std::make_unique<TimestampPacketContainer>();
|
mockCmdQ->timestampPacketContainer = std::make_unique<TimestampPacketContainer>();
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
TimestampPacketDependencies timestampPacketDependencies;
|
TimestampPacketDependencies timestampPacketDependencies;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
|
|
||||||
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
auto cmdStream = new LinearStream(device->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getRootDeviceIndex(), 1, GraphicsAllocation::AllocationType::COMMAND_BUFFER, device->getDeviceBitfield()}));
|
||||||
auto kernelOperation = std::make_unique<KernelOperation>(cmdStream, *mockCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
auto kernelOperation = std::make_unique<KernelOperation>(cmdStream, *mockCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
@@ -349,9 +349,9 @@ HWTEST_F(DispatchFlagsTests, givenCommandComputeKernelWhenSubmitThenPassCorrectD
|
|||||||
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
auto mockCsr = static_cast<CsrType *>(&mockCmdQ->getGpgpuCommandStreamReceiver());
|
||||||
|
|
||||||
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 1, ih1);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 1, ih1);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, 1, ih2);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::INDIRECT_OBJECT, 1, ih2);
|
||||||
mockCmdQ->allocateHeapMemory(IndirectHeap::SURFACE_STATE, 1, ih3);
|
mockCmdQ->allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 1, ih3);
|
||||||
mockCmdQ->dispatchHints = 1234;
|
mockCmdQ->dispatchHints = 1234;
|
||||||
|
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
void IndirectHeapFixture::SetUp(CommandQueue *pCmdQ) {
|
void IndirectHeapFixture::SetUp(CommandQueue *pCmdQ) {
|
||||||
pDSH = &pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
pDSH = &pCmdQ->getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
pSSH = &pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096);
|
pSSH = &pCmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 4096);
|
||||||
pIOH = &pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 4096);
|
pIOH = &pCmdQ->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, 4096);
|
||||||
}
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -65,7 +65,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, KernelSLMAndBarrierTest, GivenStaticSlmSizeWhenProgr
|
|||||||
ASSERT_EQ(CL_SUCCESS, kernel.initialize());
|
ASSERT_EQ(CL_SUCCESS, kernel.initialize());
|
||||||
|
|
||||||
// After creating Mock Kernel now create Indirect Heap
|
// After creating Mock Kernel now create Indirect Heap
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
|
|
||||||
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ HWTEST_F(KernelSLMAndBarrierTest, GivenInterfaceDescriptorProgrammedWhenOverride
|
|||||||
ASSERT_EQ(CL_SUCCESS, kernel.initialize());
|
ASSERT_EQ(CL_SUCCESS, kernel.initialize());
|
||||||
|
|
||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pClDevice, 0, false);
|
||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 8192);
|
||||||
|
|
||||||
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
||||||
INTERFACE_DESCRIPTOR_DATA interfaceDescriptorData;
|
INTERFACE_DESCRIPTOR_DATA interfaceDescriptorData;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ TEST_F(MultiDeviceStorageInfoTest, whenCreatingStorageInfoForWorkPartitionSurfac
|
|||||||
|
|
||||||
HWTEST_F(MultiDeviceStorageInfoTest, givenSingleTileCsrWhenAllocatingCsrSpecificAllocationsThenStoreThemInSystemMemory) {
|
HWTEST_F(MultiDeviceStorageInfoTest, givenSingleTileCsrWhenAllocatingCsrSpecificAllocationsThenStoreThemInSystemMemory) {
|
||||||
auto commandStreamReceiver = static_cast<UltCommandStreamReceiver<FamilyType> *>(factory.rootDevices[0]->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver);
|
auto commandStreamReceiver = static_cast<UltCommandStreamReceiver<FamilyType> *>(factory.rootDevices[0]->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver);
|
||||||
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
||||||
auto heapAllocation = heap.getGraphicsAllocation();
|
auto heapAllocation = heap.getGraphicsAllocation();
|
||||||
if (commandStreamReceiver->canUse4GbHeaps) {
|
if (commandStreamReceiver->canUse4GbHeaps) {
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -112,7 +112,7 @@ HWTEST_F(EnqueueBufferWindowsTest, givenMisalignedHostPtrWhenEnqueueReadBufferCa
|
|||||||
auto &kernelInfo = kernel->getKernelInfo();
|
auto &kernelInfo = kernel->getKernelInfo();
|
||||||
|
|
||||||
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
if (hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress) {
|
||||||
const auto &surfaceStateDst = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0), 1);
|
const auto &surfaceStateDst = getSurfaceState<FamilyType>(&cmdQ->getIndirectHeap(IndirectHeap::Type::SURFACE_STATE, 0), 1);
|
||||||
|
|
||||||
const auto &arg1AsPtr = kernelInfo.getArgDescriptorAt(1).as<ArgDescPointer>();
|
const auto &arg1AsPtr = kernelInfo.getArgDescriptorAt(1).as<ArgDescPointer>();
|
||||||
if (arg1AsPtr.pointerSize == sizeof(uint64_t)) {
|
if (arg1AsPtr.pointerSize == sizeof(uint64_t)) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -62,7 +62,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenSingleTileCsrWhenAllocatingCsrSpe
|
|||||||
hwInfo->platform.usRevId = 0b111000; // not BD A0
|
hwInfo->platform.usRevId = 0b111000; // not BD A0
|
||||||
|
|
||||||
auto commandStreamReceiver = clDevice->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver;
|
auto commandStreamReceiver = clDevice->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver;
|
||||||
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
||||||
auto heapAllocation = heap.getGraphicsAllocation();
|
auto heapAllocation = heap.getGraphicsAllocation();
|
||||||
if (commandStreamReceiver->canUse4GbHeaps) {
|
if (commandStreamReceiver->canUse4GbHeaps) {
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
||||||
@@ -94,7 +94,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenMultiTileCsrWhenAllocatingCsrSpec
|
|||||||
hwInfo->platform.usRevId = 0b111000; // not BD A0
|
hwInfo->platform.usRevId = 0b111000; // not BD A0
|
||||||
|
|
||||||
auto commandStreamReceiver = clDevice->getDefaultEngine().commandStreamReceiver;
|
auto commandStreamReceiver = clDevice->getDefaultEngine().commandStreamReceiver;
|
||||||
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
||||||
auto heapAllocation = heap.getGraphicsAllocation();
|
auto heapAllocation = heap.getGraphicsAllocation();
|
||||||
if (commandStreamReceiver->canUse4GbHeaps) {
|
if (commandStreamReceiver->canUse4GbHeaps) {
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
||||||
@@ -127,7 +127,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenSingleTileBdA0CsrWhenAllocatingCs
|
|||||||
hwInfo->platform.usRevId = 0; // BD A0
|
hwInfo->platform.usRevId = 0; // BD A0
|
||||||
|
|
||||||
auto commandStreamReceiver = clDevice->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver;
|
auto commandStreamReceiver = clDevice->getSubDevice(tileIndex)->getDefaultEngine().commandStreamReceiver;
|
||||||
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
auto &heap = commandStreamReceiver->getIndirectHeap(IndirectHeap::Type::INDIRECT_OBJECT, MemoryConstants::pageSize64k);
|
||||||
auto heapAllocation = heap.getGraphicsAllocation();
|
auto heapAllocation = heap.getGraphicsAllocation();
|
||||||
if (commandStreamReceiver->canUse4GbHeaps) {
|
if (commandStreamReceiver->canUse4GbHeaps) {
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::INTERNAL_HEAP, heapAllocation->getAllocationType());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -41,6 +41,20 @@ CommandContainer::~CommandContainer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommandContainer::CommandContainer() {
|
||||||
|
for (auto &indirectHeap : indirectHeaps) {
|
||||||
|
indirectHeap = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto &allocationIndirectHeap : allocationIndirectHeaps) {
|
||||||
|
allocationIndirectHeap = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CommandContainer::CommandContainer(uint32_t maxNumAggregatedIdds) : CommandContainer() {
|
||||||
|
numIddsPerBlock = maxNumAggregatedIdds;
|
||||||
|
}
|
||||||
|
|
||||||
ErrorCode CommandContainer::initialize(Device *device, AllocationsList *reusableAllocationList) {
|
ErrorCode CommandContainer::initialize(Device *device, AllocationsList *reusableAllocationList) {
|
||||||
this->device = device;
|
this->device = device;
|
||||||
this->reusableAllocationList = reusableAllocationList;
|
this->reusableAllocationList = reusableAllocationList;
|
||||||
@@ -57,6 +71,7 @@ ErrorCode CommandContainer::initialize(Device *device, AllocationsList *reusable
|
|||||||
|
|
||||||
commandStream = std::unique_ptr<LinearStream>(new LinearStream(cmdBufferAllocation->getUnderlyingBuffer(),
|
commandStream = std::unique_ptr<LinearStream>(new LinearStream(cmdBufferAllocation->getUnderlyingBuffer(),
|
||||||
defaultListCmdBufferSize));
|
defaultListCmdBufferSize));
|
||||||
|
|
||||||
commandStream->replaceGraphicsAllocation(cmdBufferAllocation);
|
commandStream->replaceGraphicsAllocation(cmdBufferAllocation);
|
||||||
|
|
||||||
if (!getFlushTaskUsedForImmediate()) {
|
if (!getFlushTaskUsedForImmediate()) {
|
||||||
@@ -67,7 +82,7 @@ ErrorCode CommandContainer::initialize(Device *device, AllocationsList *reusable
|
|||||||
heapHelper = std::unique_ptr<HeapHelper>(new HeapHelper(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumGenericSubDevices() > 1u));
|
heapHelper = std::unique_ptr<HeapHelper>(new HeapHelper(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumGenericSubDevices() > 1u));
|
||||||
|
|
||||||
for (uint32_t i = 0; i < IndirectHeap::Type::NUM_TYPES; i++) {
|
for (uint32_t i = 0; i < IndirectHeap::Type::NUM_TYPES; i++) {
|
||||||
if (NEO::ApiSpecificConfig::getBindlessConfiguration() && i != IndirectHeap::INDIRECT_OBJECT) {
|
if (NEO::ApiSpecificConfig::getBindlessConfiguration() && i != IndirectHeap::Type::INDIRECT_OBJECT) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
allocationIndirectHeaps[i] = heapHelper->getHeapAllocation(i,
|
allocationIndirectHeaps[i] = heapHelper->getHeapAllocation(i,
|
||||||
@@ -79,7 +94,7 @@ ErrorCode CommandContainer::initialize(Device *device, AllocationsList *reusable
|
|||||||
}
|
}
|
||||||
residencyContainer.push_back(allocationIndirectHeaps[i]);
|
residencyContainer.push_back(allocationIndirectHeaps[i]);
|
||||||
|
|
||||||
bool requireInternalHeap = (IndirectHeap::INDIRECT_OBJECT == i);
|
bool requireInternalHeap = (IndirectHeap::Type::INDIRECT_OBJECT == i);
|
||||||
indirectHeaps[i] = std::make_unique<IndirectHeap>(allocationIndirectHeaps[i], requireInternalHeap);
|
indirectHeaps[i] = std::make_unique<IndirectHeap>(allocationIndirectHeaps[i], requireInternalHeap);
|
||||||
if (i == IndirectHeap::Type::SURFACE_STATE) {
|
if (i == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
indirectHeaps[i]->getSpace(reservedSshSize);
|
indirectHeaps[i]->getSpace(reservedSshSize);
|
||||||
@@ -259,20 +274,25 @@ void CommandContainer::allocateNextCommandBuffer() {
|
|||||||
|
|
||||||
void CommandContainer::prepareBindfulSsh() {
|
void CommandContainer::prepareBindfulSsh() {
|
||||||
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
||||||
if (allocationIndirectHeaps[IndirectHeap::SURFACE_STATE] == nullptr) {
|
if (allocationIndirectHeaps[IndirectHeap::Type::SURFACE_STATE] == nullptr) {
|
||||||
size_t alignedSize = alignUp<size_t>(totalCmdBufferSize, MemoryConstants::pageSize64k);
|
size_t alignedSize = alignUp<size_t>(totalCmdBufferSize, MemoryConstants::pageSize64k);
|
||||||
constexpr size_t heapSize = 65536u;
|
constexpr size_t heapSize = 65536u;
|
||||||
allocationIndirectHeaps[IndirectHeap::SURFACE_STATE] = heapHelper->getHeapAllocation(IndirectHeap::SURFACE_STATE,
|
allocationIndirectHeaps[IndirectHeap::Type::SURFACE_STATE] = heapHelper->getHeapAllocation(IndirectHeap::Type::SURFACE_STATE,
|
||||||
heapSize,
|
heapSize,
|
||||||
alignedSize,
|
alignedSize,
|
||||||
device->getRootDeviceIndex());
|
device->getRootDeviceIndex());
|
||||||
UNRECOVERABLE_IF(!allocationIndirectHeaps[IndirectHeap::SURFACE_STATE]);
|
UNRECOVERABLE_IF(!allocationIndirectHeaps[IndirectHeap::Type::SURFACE_STATE]);
|
||||||
residencyContainer.push_back(allocationIndirectHeaps[IndirectHeap::SURFACE_STATE]);
|
residencyContainer.push_back(allocationIndirectHeaps[IndirectHeap::Type::SURFACE_STATE]);
|
||||||
|
|
||||||
indirectHeaps[IndirectHeap::SURFACE_STATE] = std::make_unique<IndirectHeap>(allocationIndirectHeaps[IndirectHeap::SURFACE_STATE], false);
|
indirectHeaps[IndirectHeap::Type::SURFACE_STATE] = std::make_unique<IndirectHeap>(allocationIndirectHeaps[IndirectHeap::Type::SURFACE_STATE], false);
|
||||||
indirectHeaps[IndirectHeap::SURFACE_STATE]->getSpace(reservedSshSize);
|
indirectHeaps[IndirectHeap::Type::SURFACE_STATE]->getSpace(reservedSshSize);
|
||||||
}
|
}
|
||||||
setHeapDirty(IndirectHeap::SURFACE_STATE);
|
setHeapDirty(IndirectHeap::Type::SURFACE_STATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IndirectHeap *CommandContainer::getIndirectHeap(HeapType heapType) {
|
||||||
|
return indirectHeaps[heapType].get();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "shared/source/command_stream/csr_definitions.h"
|
#include "shared/source/command_stream/csr_definitions.h"
|
||||||
#include "shared/source/helpers/heap_helper.h"
|
#include "shared/source/helpers/heap_helper.h"
|
||||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
#include "shared/source/indirect_heap/indirect_heap_type.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@@ -21,10 +21,12 @@ class Device;
|
|||||||
class GraphicsAllocation;
|
class GraphicsAllocation;
|
||||||
class LinearStream;
|
class LinearStream;
|
||||||
class AllocationsList;
|
class AllocationsList;
|
||||||
|
class IndirectHeap;
|
||||||
|
|
||||||
using ResidencyContainer = std::vector<GraphicsAllocation *>;
|
using ResidencyContainer = std::vector<GraphicsAllocation *>;
|
||||||
using CmdBufferContainer = std::vector<GraphicsAllocation *>;
|
using CmdBufferContainer = std::vector<GraphicsAllocation *>;
|
||||||
using HeapType = IndirectHeap::Type;
|
using HeapContainer = std::vector<GraphicsAllocation *>;
|
||||||
|
using HeapType = IndirectHeapType;
|
||||||
|
|
||||||
enum class ErrorCode {
|
enum class ErrorCode {
|
||||||
SUCCESS = 0,
|
SUCCESS = 0,
|
||||||
@@ -39,19 +41,9 @@ class CommandContainer : public NonCopyableOrMovableClass {
|
|||||||
MemoryConstants::cacheLineSize +
|
MemoryConstants::cacheLineSize +
|
||||||
CSRequirements::csOverfetchSize;
|
CSRequirements::csOverfetchSize;
|
||||||
|
|
||||||
CommandContainer() {
|
CommandContainer();
|
||||||
for (auto &indirectHeap : indirectHeaps) {
|
|
||||||
indirectHeap = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto &allocationIndirectHeap : allocationIndirectHeaps) {
|
CommandContainer(uint32_t maxNumAggregatedIdds);
|
||||||
allocationIndirectHeap = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandContainer(uint32_t maxNumAggregatedIdds) : CommandContainer() {
|
|
||||||
numIddsPerBlock = maxNumAggregatedIdds;
|
|
||||||
}
|
|
||||||
|
|
||||||
CmdBufferContainer &getCmdBufferAllocations() { return cmdBufferAllocations; }
|
CmdBufferContainer &getCmdBufferAllocations() { return cmdBufferAllocations; }
|
||||||
|
|
||||||
@@ -64,7 +56,7 @@ class CommandContainer : public NonCopyableOrMovableClass {
|
|||||||
|
|
||||||
LinearStream *getCommandStream() { return commandStream.get(); }
|
LinearStream *getCommandStream() { return commandStream.get(); }
|
||||||
|
|
||||||
IndirectHeap *getIndirectHeap(HeapType heapType) { return indirectHeaps[heapType].get(); }
|
IndirectHeap *getIndirectHeap(HeapType heapType);
|
||||||
|
|
||||||
HeapHelper *getHeapHelper() { return heapHelper.get(); }
|
HeapHelper *getHeapHelper() { return heapHelper.get(); }
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "shared/source/helpers/definitions/mi_flush_args.h"
|
#include "shared/source/helpers/definitions/mi_flush_args.h"
|
||||||
#include "shared/source/helpers/register_offsets.h"
|
#include "shared/source/helpers/register_offsets.h"
|
||||||
#include "shared/source/helpers/simd_helper.h"
|
#include "shared/source/helpers/simd_helper.h"
|
||||||
|
#include "shared/source/helpers/vec.h"
|
||||||
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
|
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
|
||||||
#include "shared/source/kernel/kernel_arg_descriptor.h"
|
#include "shared/source/kernel/kernel_arg_descriptor.h"
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ namespace NEO {
|
|||||||
class BindlessHeapsHelper;
|
class BindlessHeapsHelper;
|
||||||
class GmmHelper;
|
class GmmHelper;
|
||||||
class IndirectHeap;
|
class IndirectHeap;
|
||||||
|
class Gmm;
|
||||||
struct HardwareInfo;
|
struct HardwareInfo;
|
||||||
struct StateComputeModeProperties;
|
struct StateComputeModeProperties;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "shared/source/helpers/simd_helper.h"
|
#include "shared/source/helpers/simd_helper.h"
|
||||||
#include "shared/source/helpers/string.h"
|
#include "shared/source/helpers/string.h"
|
||||||
#include "shared/source/image/image_surface_state.h"
|
#include "shared/source/image/image_surface_state.h"
|
||||||
|
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||||
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
|
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
|
||||||
#include "shared/source/kernel/implicit_args.h"
|
#include "shared/source/kernel/implicit_args.h"
|
||||||
#include "shared/source/kernel/kernel_descriptor.h"
|
#include "shared/source/kernel/kernel_descriptor.h"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "shared/source/command_container/walker_partition_xehp_and_later.h"
|
#include "shared/source/command_container/walker_partition_xehp_and_later.h"
|
||||||
#include "shared/source/command_stream/linear_stream.h"
|
#include "shared/source/command_stream/linear_stream.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi
|
|||||||
this->dispatchMode = (DispatchMode)DebugManager.flags.CsrDispatchMode.get();
|
this->dispatchMode = (DispatchMode)DebugManager.flags.CsrDispatchMode.get();
|
||||||
}
|
}
|
||||||
flushStamp.reset(new FlushStampTracker(true));
|
flushStamp.reset(new FlushStampTracker(true));
|
||||||
for (int i = 0; i < IndirectHeap::NUM_TYPES; ++i) {
|
for (int i = 0; i < IndirectHeap::Type::NUM_TYPES; ++i) {
|
||||||
indirectHeap[i] = nullptr;
|
indirectHeap[i] = nullptr;
|
||||||
}
|
}
|
||||||
internalAllocationStorage = std::make_unique<InternalAllocationStorage>(*this);
|
internalAllocationStorage = std::make_unique<InternalAllocationStorage>(*this);
|
||||||
@@ -80,7 +80,7 @@ CommandStreamReceiver::~CommandStreamReceiver() {
|
|||||||
userPauseConfirmation->join();
|
userPauseConfirmation->join();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < IndirectHeap::NUM_TYPES; ++i) {
|
for (int i = 0; i < IndirectHeap::Type::NUM_TYPES; ++i) {
|
||||||
if (indirectHeap[i] != nullptr) {
|
if (indirectHeap[i] != nullptr) {
|
||||||
auto allocation = indirectHeap[i]->getGraphicsAllocation();
|
auto allocation = indirectHeap[i]->getGraphicsAllocation();
|
||||||
if (allocation != nullptr) {
|
if (allocation != nullptr) {
|
||||||
@@ -450,10 +450,10 @@ void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
|
|||||||
size_t minRequiredSize, IndirectHeap *&indirectHeap) {
|
size_t minRequiredSize, IndirectHeap *&indirectHeap) {
|
||||||
size_t reservedSize = 0;
|
size_t reservedSize = 0;
|
||||||
auto finalHeapSize = defaultHeapSize;
|
auto finalHeapSize = defaultHeapSize;
|
||||||
if (IndirectHeap::SURFACE_STATE == heapType) {
|
if (IndirectHeap::Type::SURFACE_STATE == heapType) {
|
||||||
finalHeapSize = defaultSshSize;
|
finalHeapSize = defaultSshSize;
|
||||||
}
|
}
|
||||||
bool requireInternalHeap = IndirectHeap::INDIRECT_OBJECT == heapType ? canUse4GbHeaps : false;
|
bool requireInternalHeap = IndirectHeap::Type::INDIRECT_OBJECT == heapType ? canUse4GbHeaps : false;
|
||||||
|
|
||||||
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
||||||
requireInternalHeap = false;
|
requireInternalHeap = false;
|
||||||
@@ -475,7 +475,7 @@ void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
|
|||||||
finalHeapSize = std::max(heapMemory->getUnderlyingBufferSize(), finalHeapSize);
|
finalHeapSize = std::max(heapMemory->getUnderlyingBufferSize(), finalHeapSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IndirectHeap::SURFACE_STATE == heapType) {
|
if (IndirectHeap::Type::SURFACE_STATE == heapType) {
|
||||||
DEBUG_BREAK_IF(minRequiredSize > defaultSshSize - MemoryConstants::pageSize);
|
DEBUG_BREAK_IF(minRequiredSize > defaultSshSize - MemoryConstants::pageSize);
|
||||||
finalHeapSize = defaultSshSize - MemoryConstants::pageSize;
|
finalHeapSize = defaultSshSize - MemoryConstants::pageSize;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ class CommandStreamReceiver {
|
|||||||
|
|
||||||
MultiGraphicsAllocation *tagsMultiAllocation = nullptr;
|
MultiGraphicsAllocation *tagsMultiAllocation = nullptr;
|
||||||
|
|
||||||
IndirectHeap *indirectHeap[IndirectHeap::NUM_TYPES];
|
IndirectHeap *indirectHeap[IndirectHeap::Type::NUM_TYPES];
|
||||||
OsContext *osContext = nullptr;
|
OsContext *osContext = nullptr;
|
||||||
|
|
||||||
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -74,7 +74,7 @@ uint64_t ScratchSpaceControllerBase::getScratchPatchAddress() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScratchSpaceControllerBase::reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) {
|
void ScratchSpaceControllerBase::reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) {
|
||||||
if (heapType == IndirectHeap::SURFACE_STATE) {
|
if (heapType == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
auto &hwHelper = HwHelper::get(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()->platform.eRenderCoreFamily);
|
auto &hwHelper = HwHelper::get(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()->platform.eRenderCoreFamily);
|
||||||
auto surfaceStateSize = hwHelper.getRenderSurfaceStateSize();
|
auto surfaceStateSize = hwHelper.getRenderSurfaceStateSize();
|
||||||
indirectHeap->getSpace(surfaceStateSize);
|
indirectHeap->getSpace(surfaceStateSize);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -127,7 +127,7 @@ size_t ScratchSpaceControllerXeHPAndLater::getOffsetToSurfaceState(uint32_t requ
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScratchSpaceControllerXeHPAndLater::reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) {
|
void ScratchSpaceControllerXeHPAndLater::reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) {
|
||||||
if (heapType == IndirectHeap::SURFACE_STATE) {
|
if (heapType == IndirectHeap::Type::SURFACE_STATE) {
|
||||||
indirectHeap->getSpace(getOffsetToSurfaceState(stateSlotsCount));
|
indirectHeap->getSpace(getOffsetToSurfaceState(stateSlotsCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2019-2020 Intel Corporation
|
# Copyright (C) 2019-2022 Intel Corporation
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
set(NEO_CORE_INDIRECT_HEAP
|
set(NEO_CORE_INDIRECT_HEAP
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/indirect_heap.h
|
${CMAKE_CURRENT_SOURCE_DIR}/indirect_heap.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/indirect_heap_type.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY NEO_CORE_INDIRECT_HEAP ${NEO_CORE_INDIRECT_HEAP})
|
set_property(GLOBAL PROPERTY NEO_CORE_INDIRECT_HEAP ${NEO_CORE_INDIRECT_HEAP})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "shared/source/helpers/basic_math.h"
|
#include "shared/source/helpers/basic_math.h"
|
||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
#include "shared/source/helpers/ptr_math.h"
|
#include "shared/source/helpers/ptr_math.h"
|
||||||
|
#include "shared/source/indirect_heap/indirect_heap_type.h"
|
||||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
@@ -24,13 +25,7 @@ class IndirectHeap : public LinearStream {
|
|||||||
typedef LinearStream BaseClass;
|
typedef LinearStream BaseClass;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Type {
|
using Type = IndirectHeapType;
|
||||||
DYNAMIC_STATE = 0,
|
|
||||||
INDIRECT_OBJECT,
|
|
||||||
SURFACE_STATE,
|
|
||||||
NUM_TYPES
|
|
||||||
};
|
|
||||||
|
|
||||||
IndirectHeap(void *graphicsAllocation, size_t bufferSize) : BaseClass(graphicsAllocation, bufferSize){};
|
IndirectHeap(void *graphicsAllocation, size_t bufferSize) : BaseClass(graphicsAllocation, bufferSize){};
|
||||||
IndirectHeap(GraphicsAllocation *graphicsAllocation) : BaseClass(graphicsAllocation) {}
|
IndirectHeap(GraphicsAllocation *graphicsAllocation) : BaseClass(graphicsAllocation) {}
|
||||||
IndirectHeap(GraphicsAllocation *graphicsAllocation, bool canBeUtilizedAs4GbHeap)
|
IndirectHeap(GraphicsAllocation *graphicsAllocation, bool canBeUtilizedAs4GbHeap)
|
||||||
|
|||||||
17
shared/source/indirect_heap/indirect_heap_type.h
Normal file
17
shared/source/indirect_heap/indirect_heap_type.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
enum IndirectHeapType {
|
||||||
|
DYNAMIC_STATE = 0,
|
||||||
|
INDIRECT_OBJECT,
|
||||||
|
SURFACE_STATE,
|
||||||
|
NUM_TYPES
|
||||||
|
};
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 Intel Corporation
|
* Copyright (C) 2018-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -83,7 +83,7 @@ struct HardwareParse {
|
|||||||
previousCS = &commandStream;
|
previousCS = &commandStream;
|
||||||
|
|
||||||
sizeUsed = commandStream.getUsed();
|
sizeUsed = commandStream.getUsed();
|
||||||
findHardwareCommands<FamilyType>(&commandStreamReceiver.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0));
|
findHardwareCommands<FamilyType>(&commandStreamReceiver.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FamilyType>
|
template <typename FamilyType>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 Intel Corporation
|
* Copyright (C) 2019-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -523,9 +523,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
Device,
|
Device,
|
||||||
CommandContainerHeaps,
|
CommandContainerHeaps,
|
||||||
testing::Values(
|
testing::Values(
|
||||||
IndirectHeap::DYNAMIC_STATE,
|
IndirectHeap::Type::DYNAMIC_STATE,
|
||||||
IndirectHeap::INDIRECT_OBJECT,
|
IndirectHeap::Type::INDIRECT_OBJECT,
|
||||||
IndirectHeap::SURFACE_STATE));
|
IndirectHeap::Type::SURFACE_STATE));
|
||||||
|
|
||||||
TEST_P(CommandContainerHeaps, givenCommandContainerWhenGetAllowHeapGrowCalledThenHeapIsReturned) {
|
TEST_P(CommandContainerHeaps, givenCommandContainerWhenGetAllowHeapGrowCalledThenHeapIsReturned) {
|
||||||
HeapType heap = GetParam();
|
HeapType heap = GetParam();
|
||||||
@@ -557,7 +557,7 @@ TEST_P(CommandContainerHeaps, givenCommandContainerWhenGetingMoreThanAvailableSi
|
|||||||
auto usedSpaceAfter = cmdContainer.getIndirectHeap(heap)->getUsed();
|
auto usedSpaceAfter = cmdContainer.getIndirectHeap(heap)->getUsed();
|
||||||
auto availableSizeAfter = cmdContainer.getIndirectHeap(heap)->getAvailableSpace();
|
auto availableSizeAfter = cmdContainer.getIndirectHeap(heap)->getAvailableSpace();
|
||||||
EXPECT_GT(usedSpaceAfter + availableSizeAfter, usedSpaceBefore + availableSizeBefore);
|
EXPECT_GT(usedSpaceAfter + availableSizeAfter, usedSpaceBefore + availableSizeBefore);
|
||||||
EXPECT_EQ(!cmdContainer.isHeapDirty(heap), heap == IndirectHeap::INDIRECT_OBJECT);
|
EXPECT_EQ(!cmdContainer.isHeapDirty(heap), heap == IndirectHeap::Type::INDIRECT_OBJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(CommandContainerHeaps, givenCommandContainerForDifferentRootDevicesThenHeapsAreCreatedWithCorrectRootDeviceIndex) {
|
TEST_P(CommandContainerHeaps, givenCommandContainerForDifferentRootDevicesThenHeapsAreCreatedWithCorrectRootDeviceIndex) {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/command_container/command_encoder.h"
|
#include "shared/source/command_container/command_encoder.h"
|
||||||
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|||||||
@@ -213,16 +213,16 @@ HWTEST_F(CommandStreamReceiverTest, givenL0CommandStreamReceiverThenDefaultDispa
|
|||||||
|
|
||||||
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenGetIndirectHeapIsCalledThenHeapIsReturned) {
|
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenGetIndirectHeapIsCalledThenHeapIsReturned) {
|
||||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
auto &heap = csr.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10u);
|
auto &heap = csr.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10u);
|
||||||
EXPECT_NE(nullptr, heap.getGraphicsAllocation());
|
EXPECT_NE(nullptr, heap.getGraphicsAllocation());
|
||||||
EXPECT_NE(nullptr, csr.indirectHeap[IndirectHeap::DYNAMIC_STATE]);
|
EXPECT_NE(nullptr, csr.indirectHeap[IndirectHeap::Type::DYNAMIC_STATE]);
|
||||||
EXPECT_EQ(&heap, csr.indirectHeap[IndirectHeap::DYNAMIC_STATE]);
|
EXPECT_EQ(&heap, csr.indirectHeap[IndirectHeap::Type::DYNAMIC_STATE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenReleaseIndirectHeapIsCalledThenHeapAllocationIsNull) {
|
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenReleaseIndirectHeapIsCalledThenHeapAllocationIsNull) {
|
||||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
auto &heap = csr.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 10u);
|
auto &heap = csr.getIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE, 10u);
|
||||||
csr.releaseIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
csr.releaseIndirectHeap(IndirectHeap::Type::DYNAMIC_STATE);
|
||||||
EXPECT_EQ(nullptr, heap.getGraphicsAllocation());
|
EXPECT_EQ(nullptr, heap.getGraphicsAllocation());
|
||||||
EXPECT_EQ(0u, heap.getMaxAvailableSpace());
|
EXPECT_EQ(0u, heap.getMaxAvailableSpace());
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ HWTEST_F(CommandStreamReceiverTest, givenCsrWhenReleaseIndirectHeapIsCalledThenH
|
|||||||
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenAllocateHeapMemoryIsCalledThenHeapMemoryIsAllocated) {
|
HWTEST_F(CommandStreamReceiverTest, givenCsrWhenAllocateHeapMemoryIsCalledThenHeapMemoryIsAllocated) {
|
||||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
IndirectHeap *dsh = nullptr;
|
IndirectHeap *dsh = nullptr;
|
||||||
csr.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, 4096u, dsh);
|
csr.allocateHeapMemory(IndirectHeap::Type::DYNAMIC_STATE, 4096u, dsh);
|
||||||
EXPECT_NE(nullptr, dsh);
|
EXPECT_NE(nullptr, dsh);
|
||||||
ASSERT_NE(nullptr, dsh->getGraphicsAllocation());
|
ASSERT_NE(nullptr, dsh->getGraphicsAllocation());
|
||||||
csr.getMemoryManager()->freeGraphicsMemory(dsh->getGraphicsAllocation());
|
csr.getMemoryManager()->freeGraphicsMemory(dsh->getGraphicsAllocation());
|
||||||
@@ -240,7 +240,7 @@ HWTEST_F(CommandStreamReceiverTest, givenCsrWhenAllocateHeapMemoryIsCalledThenHe
|
|||||||
HWTEST_F(CommandStreamReceiverTest, givenSurfaceStateHeapTypeWhenAllocateHeapMemoryIsCalledThenSSHHasInitialSpaceReserevedForBindlessOffsets) {
|
HWTEST_F(CommandStreamReceiverTest, givenSurfaceStateHeapTypeWhenAllocateHeapMemoryIsCalledThenSSHHasInitialSpaceReserevedForBindlessOffsets) {
|
||||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
IndirectHeap *ssh = nullptr;
|
IndirectHeap *ssh = nullptr;
|
||||||
csr.allocateHeapMemory(IndirectHeap::SURFACE_STATE, 4096u, ssh);
|
csr.allocateHeapMemory(IndirectHeap::Type::SURFACE_STATE, 4096u, ssh);
|
||||||
EXPECT_NE(nullptr, ssh);
|
EXPECT_NE(nullptr, ssh);
|
||||||
ASSERT_NE(nullptr, ssh->getGraphicsAllocation());
|
ASSERT_NE(nullptr, ssh->getGraphicsAllocation());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user