Revert "Program border color once per dsh"

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2021-05-17 10:08:54 +00:00
committed by Compute-Runtime-Automation
parent 1557cd21e0
commit 159404f38e
19 changed files with 117 additions and 133 deletions

View File

@ -571,19 +571,6 @@ TEST_P(CommandQueueIndirectHeapTest, WhenGettingIndirectHeapWithNewSizeThenMaxAv
}
}
TEST_P(CommandQueueIndirectHeapTest, WhenGettingIndirectHeapWithNewSizeThenBorderColorOffsetIsSetToMaxUint) {
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
MockCommandQueue cmdQ(context.get(), pClDevice, props);
auto &indirectHeapInitial = cmdQ.getIndirectHeap(this->GetParam(), 10);
indirectHeapInitial.setBorderColor(nullptr, 0);
EXPECT_NE(indirectHeapInitial.getBorderColorOffset(), std::numeric_limits<uint32_t>::max());
size_t requiredSize = indirectHeapInitial.getMaxAvailableSpace() + 42;
const auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), requiredSize);
EXPECT_EQ(indirectHeap.getBorderColorOffset(), std::numeric_limits<uint32_t>::max());
}
TEST_P(CommandQueueIndirectHeapTest, WhenGettingIndirectHeapThenSizeIsAlignedToCacheLine) {
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
MockCommandQueue cmdQ(context.get(), pClDevice, props);
@ -720,27 +707,6 @@ TEST_P(CommandQueueIndirectHeapTest, GivenCommandQueueWithHeapAllocatedWhenIndir
EXPECT_EQ(0u, indirectHeap.getMaxAvailableSpace());
}
TEST_P(CommandQueueIndirectHeapTest, GivenCommandQueueWithHeapAllocatedWhenIndirectHeapIsReleasedThenBorderColorOffsetResetWasCalled) {
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
MockCommandQueue cmdQ(context.get(), pClDevice, props);
EXPECT_TRUE(pDevice->getDefaultEngine().commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
const auto &indirectHeap = cmdQ.getIndirectHeap(this->GetParam(), 100);
auto heapSize = indirectHeap.getMaxAvailableSpace();
EXPECT_NE(0u, heapSize);
auto graphicsAllocation = indirectHeap.getGraphicsAllocation();
EXPECT_NE(nullptr, graphicsAllocation);
auto &csr = pDevice->getUltCommandStreamReceiver<DEFAULT_TEST_FAMILY_NAME>();
csr.indirectHeap[this->GetParam()]->setBorderColor(nullptr, 0);
EXPECT_NE(csr.indirectHeap[this->GetParam()]->getBorderColorOffset(), std::numeric_limits<uint32_t>::max());
cmdQ.releaseIndirectHeap(this->GetParam());
EXPECT_EQ(csr.indirectHeap[this->GetParam()]->getBorderColorOffset(), std::numeric_limits<uint32_t>::max());
}
TEST_P(CommandQueueIndirectHeapTest, GivenCommandQueueWithoutHeapAllocatedWhenIndirectHeapIsReleasedThenIndirectHeapAllocationStaysNull) {
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
MockCommandQueue cmdQ(context.get(), pClDevice, props);