Make Timestamp allocations OneTimeAubWritable

Change-Id: I22e973714e4df1b3a07d8fb45cdab37b28a6433e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2018-11-14 15:26:23 +01:00
committed by sys_ocldev
parent 08424d798f
commit bd4ea652ec
6 changed files with 12 additions and 4 deletions

View File

@@ -601,7 +601,8 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenWriteMe
GraphicsAllocation::AllocationType::BUFFER,
GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY,
GraphicsAllocation::AllocationType::BUFFER_COMPRESSED,
GraphicsAllocation::AllocationType::IMAGE};
GraphicsAllocation::AllocationType::IMAGE,
GraphicsAllocation::AllocationType::TIMESTAMP_TAG_BUFFER};
for (size_t i = 0; i < arrayCount(onlyOneTimeAubWritableTypes); i++) {
gfxAllocation->setAubWritable(true);

View File

@@ -158,7 +158,7 @@ INSTANTIATE_TEST_CASE_P(Allow32BitAnd64kbPagesTypes,
static const GraphicsAllocation::AllocationType allocationTypesWith32BitAnd64KbPagesNotAllowed[] = {GraphicsAllocation::AllocationType::COMMAND_BUFFER,
GraphicsAllocation::AllocationType::DYNAMIC_STATE_HEAP,
GraphicsAllocation::AllocationType::EVENT_TAG_BUFFER,
GraphicsAllocation::AllocationType::TIMESTAMP_TAG_BUFFER,
GraphicsAllocation::AllocationType::IMAGE,
GraphicsAllocation::AllocationType::INSTRUCTION_HEAP,
GraphicsAllocation::AllocationType::SHARED_RESOURCE};
@@ -344,4 +344,4 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenBufferTypeIsPassedAndAllocateInDev
EXPECT_FALSE(memoryManager.allocationInDevicePoolCreated);
memoryManager.freeGraphicsMemory(allocation);
}
}

View File

@@ -335,3 +335,8 @@ TEST_F(TagAllocatorTest, givenTagsOnDeferredListWhenReleasingItThenMoveReadyTags
EXPECT_TRUE(tagAllocator.deferredTags.peekIsEmpty());
EXPECT_FALSE(tagAllocator.getFreeTags().peekIsEmpty());
}
TEST_F(TagAllocatorTest, givenTagAllocatorWhenGraphicsAllocationIsCreatedThenSetTimestampTagBufferAllocationType) {
MockTagAllocator mockAllocator(memoryManager, 1, 1);
EXPECT_EQ(GraphicsAllocation::AllocationType::TIMESTAMP_TAG_BUFFER, mockAllocator.getGraphicsAllocation()->getAllocationType());
}