diff --git a/opencl/test/unit_test/memory_manager/graphics_allocation_tests.cpp b/opencl/test/unit_test/memory_manager/graphics_allocation_tests.cpp index 9a69c3d132..ecbe361f16 100644 --- a/opencl/test/unit_test/memory_manager/graphics_allocation_tests.cpp +++ b/opencl/test/unit_test/memory_manager/graphics_allocation_tests.cpp @@ -167,8 +167,11 @@ TEST(GraphicsAllocationTest, whenAllocationTypeIsISAThenAllocationIsLockable) { EXPECT_TRUE(GraphicsAllocation::isLockable(GraphicsAllocation::AllocationType::KERNEL_ISA_INTERNAL)); } -TEST(GraphicsAllocationTest, whenAllocationTypeIsBufferThenAllocationIsLockable) { - EXPECT_TRUE(GraphicsAllocation::isLockable(GraphicsAllocation::AllocationType::BUFFER)); +TEST(GraphicsAllocationTest, whenAllocationTypeIsBufferThenAllocationIsNotLockable) { + EXPECT_FALSE(GraphicsAllocation::isLockable(GraphicsAllocation::AllocationType::BUFFER)); +} + +TEST(GraphicsAllocationTest, whenAllocationTypeIsBufferHostMemoryThenAllocationIsLockable) { EXPECT_TRUE(GraphicsAllocation::isLockable(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY)); } diff --git a/shared/source/memory_manager/graphics_allocation.h b/shared/source/memory_manager/graphics_allocation.h index 07559003b9..807bb07731 100644 --- a/shared/source/memory_manager/graphics_allocation.h +++ b/shared/source/memory_manager/graphics_allocation.h @@ -233,7 +233,6 @@ class GraphicsAllocation : public IDNode { static bool isLockable(AllocationType allocationType) { return isCpuAccessRequired(allocationType) || isIsaAllocationType(allocationType) || - allocationType == AllocationType::BUFFER || allocationType == AllocationType::BUFFER_HOST_MEMORY || allocationType == AllocationType::GPU_TIMESTAMP_DEVICE_BUFFER || allocationType == AllocationType::SVM_GPU ||