@@ -373,10 +373,11 @@ TEST(MemoryManagerTest, givenFillPatternTypeWhenGetAllocationDataIsCalledThenSys
373373 EXPECT_TRUE (allocData.flags .useSystemMemory );
374374}
375375
376- TEST (MemoryManagerTest, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested ) {
376+ TEST (MemoryManagerTest, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested ) {
377377 AllocationData allocData;
378378 MockMemoryManager::getAllocationData (allocData, {1 , GraphicsAllocation::AllocationType::LINEAR_STREAM}, 0 , nullptr );
379- EXPECT_TRUE (allocData.flags .useSystemMemory );
379+ EXPECT_FALSE (allocData.flags .useSystemMemory );
380+ EXPECT_TRUE (allocData.flags .requiresCpuAccess );
380381}
381382
382383TEST (MemoryManagerTest, givenTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
@@ -422,14 +423,24 @@ TEST(MemoryManagerTest, givenInternalHeapTypeWhenGetAllocationDataIsCalledThenSy
422423 AllocationData allocData;
423424 MockMemoryManager::getAllocationData (allocData, {1 , GraphicsAllocation::AllocationType::INTERNAL_HEAP}, 0 , nullptr );
424425 EXPECT_FALSE (allocData.flags .useSystemMemory );
426+ EXPECT_TRUE (allocData.flags .requiresCpuAccess );
425427}
426428TEST (MemoryManagerTest, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
427429 AllocationData allocData;
428430 MockMemoryManager::getAllocationData (allocData, {1 , GraphicsAllocation::AllocationType::KERNEL_ISA}, 0 , nullptr );
429431 EXPECT_FALSE (allocData.flags .useSystemMemory );
432+ EXPECT_TRUE (allocData.flags .requiresCpuAccess );
430433}
434+
435+ TEST (MemoryManagerTest, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
436+ AllocationData allocData;
437+ MockMemoryManager::getAllocationData (allocData, {1 , GraphicsAllocation::AllocationType::LINEAR_STREAM}, 0 , nullptr );
438+ EXPECT_FALSE (allocData.flags .useSystemMemory );
439+ EXPECT_TRUE (allocData.flags .requiresCpuAccess );
440+ }
441+
431442TEST (MemoryManagerTest, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenInternalAllocationIsRequested) {
432443 AllocationData allocData;
433444 MockMemoryManager::getAllocationData (allocData, {1 , GraphicsAllocation::AllocationType::KERNEL_ISA}, 0 , nullptr );
434445 EXPECT_EQ (AllocationOrigin::INTERNAL_ALLOCATION, allocData.allocationOrigin );
435- }
446+ }
0 commit comments