Add additionalData member to GA

Add core path to included files

Change-Id: I8c697dd00a1f37b9af469292367cd090d4fd4875
This commit is contained in:
kamdiedrich
2019-10-07 09:22:25 +02:00
committed by sys_ocldev
parent 0a702ec679
commit 987dfdba07
2 changed files with 27 additions and 3 deletions

View File

@@ -11,6 +11,20 @@
using namespace NEO;
TEST(GraphicsAllocationTest, givenGraphicsAllocationWhenIsCreatedThenAdditionalDataIsSetToNull) {
MockGraphicsAllocation graphicsAllocation(GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0u, 0u, maxOsContextCount, MemoryPool::MemoryNull);
EXPECT_EQ(graphicsAllocation.getAdditionalData(), nullptr);
}
TEST(GraphicsAllocationTest, givenGraphicsAllocationWhenSetAdditionalDataThenAdditionalDataIsSetCorrectly) {
MockGraphicsAllocation graphicsAllocation(GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0u, 0u, maxOsContextCount, MemoryPool::MemoryNull);
uint32_t dataToCheck = 32u;
graphicsAllocation.setAdditionalData(&dataToCheck);
EXPECT_EQ(*static_cast<uint32_t *>(graphicsAllocation.getAdditionalData()), dataToCheck);
}
TEST(GraphicsAllocationTest, givenGraphicsAllocationWhenIsCreatedThenAllInspectionIdsAreSetToZero) {
MockGraphicsAllocation graphicsAllocation(GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0u, 0u, maxOsContextCount, MemoryPool::MemoryNull);
for (auto i = 0u; i < maxOsContextCount; i++) {