mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-23 03:33:13 +08:00
Add additionalData member to GA
Add core path to included files Change-Id: I8c697dd00a1f37b9af469292367cd090d4fd4875
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user