mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Create graphicsAllocation for all devices in buffer
Related-To: NEO-4589 Change-Id: Ic9625eb3c9c359fd4cc5afe3519e7acf4efb0081 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
43b47b48bf
commit
3ac197e400
@@ -1809,6 +1809,18 @@ TEST_F(BufferTransferTests, givenBufferWhenTransferFromHostPtrCalledThenCopyRequ
|
||||
|
||||
using MultiRootDeviceBufferTest = MultiRootDeviceFixture;
|
||||
|
||||
TEST_F(MultiRootDeviceBufferTest, WhenCleanAllGraphicsAllocationsCalledThenGraphicsAllocationsAreProperlyRemoved) {
|
||||
std::map<uint32_t, NEO::CreateBuffer::AllocationInfo> allocationInfo;
|
||||
|
||||
for (auto rootDeviceIndex = 1u; rootDeviceIndex < 2u; rootDeviceIndex++) {
|
||||
allocationInfo.insert({rootDeviceIndex, {}});
|
||||
}
|
||||
|
||||
allocationInfo[1u].memory = mockMemoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{1u, MemoryConstants::pageSize});
|
||||
|
||||
Buffer::cleanAllGraphicsAllocations(*context, *context->getMemoryManager(), allocationInfo);
|
||||
}
|
||||
|
||||
TEST_F(MultiRootDeviceBufferTest, WhenBufferIsCreatedThenBufferGraphicsAllocationHasCorrectRootDeviceIndex) {
|
||||
cl_int retVal = 0;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
|
||||
Reference in New Issue
Block a user