Disable cpu access for KERNEL_ISA type

Change-Id: I630668373ef162eca8f814b34ea014b3e86ea2b8
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-03-28 09:06:20 +01:00
committed by sys_ocldev
parent b17265cd3d
commit d4c8791359
3 changed files with 2 additions and 4 deletions

View File

@ -160,7 +160,6 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
static bool isCpuAccessRequired(AllocationType allocationType) {
return allocationType == AllocationType::LINEAR_STREAM ||
allocationType == AllocationType::KERNEL_ISA ||
allocationType == AllocationType::INTERNAL_HEAP ||
allocationType == AllocationType::TIMESTAMP_PACKET_TAG_BUFFER ||
allocationType == AllocationType::COMMAND_BUFFER;

View File

@ -118,8 +118,8 @@ TEST(GraphicsAllocationTest, whenAllocationTypeIsLinearStreamThenCpuAccessIsRequ
EXPECT_TRUE(GraphicsAllocation::isCpuAccessRequired(GraphicsAllocation::AllocationType::LINEAR_STREAM));
}
TEST(GraphicsAllocationTest, whenAllocationTypeIsKernelIsaThenCpuAccessIsRequired) {
EXPECT_TRUE(GraphicsAllocation::isCpuAccessRequired(GraphicsAllocation::AllocationType::KERNEL_ISA));
TEST(GraphicsAllocationTest, whenAllocationTypeIsKernelIsaThenCpuAccessIsNotRequired) {
EXPECT_FALSE(GraphicsAllocation::isCpuAccessRequired(GraphicsAllocation::AllocationType::KERNEL_ISA));
}
TEST(GraphicsAllocationTest, whenAllocationTypeIsInternalHeapThenCpuAccessIsRequired) {

View File

@ -430,7 +430,6 @@ TEST(MemoryManagerTest, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSyste
AllocationData allocData;
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::KERNEL_ISA}, {}, nullptr);
EXPECT_FALSE(allocData.flags.useSystemMemory);
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
}
TEST(MemoryManagerTest, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {