Copy command buffer into ring buffer

Resolves: NEO-7422

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-02-22 07:29:42 +00:00
committed by Compute-Runtime-Automation
parent 6e39b98094
commit 2f5be7a48d
40 changed files with 557 additions and 163 deletions

View File

@@ -161,7 +161,7 @@ TEST_F(LinearStreamTest, givenLinearStreamWithoutCmdContainerWhenOneByteLeftInSt
using CommandContainerLinearStreamTest = Test<DeviceFixture>;
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenOneByteLeftInStreamThenGetSpaceThrowAbort) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
stream->sizeUsed = stream->getMaxAvailableSpace() - 1;
EXPECT_THROW(stream->getSpace(1), std::exception);
@@ -169,7 +169,7 @@ TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenOn
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenThereIsNoSpaceForCommandAndBBEndThenNewCmdBufferAllocated) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
size_t dummyCommandSize = 2;
@@ -181,7 +181,7 @@ TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenTh
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenThereIsNoSpaceForCommandAndBBEndThenLinearStreamHasNewAllocation) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
size_t dummyCommandSize = 2;
@@ -194,7 +194,7 @@ TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenTh
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenThereIsNoSpaceForCommandAndBBEndThenGetSpaceReturnPtrFromNewAllocation) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
size_t dummyCommandSize = 2;
@@ -206,7 +206,7 @@ TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenTh
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenThereIsSpaceForCommandAndBBEndThenNewCmdBufferIsNotAllocated) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
size_t dummyCommandSize = 2;
@@ -218,7 +218,7 @@ TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenTh
TEST_F(CommandContainerLinearStreamTest, givenLinearStreamWithCmdContainerWhenThereIsNoSpaceForCommandAndBBEndThenBBEndAddedAtEndOfStream) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true);
cmdContainer.initialize(pDevice, nullptr, true, false);
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
auto stream = reinterpret_cast<MyLinearStreamMock *>(cmdContainer.getCommandStream());
size_t dummyCommandSize = 2;