mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Fix SyncBuffer page tables cloning
multiOsContextCapable param was hardcoded to false and page tables were not cloned to other SubDevices Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
c36c083812
commit
9147d4c203
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -238,3 +238,12 @@ TEST(SyncBufferHandlerDeviceTest, GivenSubDeviceWhenAllocateSyncBufferIsCalledTw
|
||||
|
||||
EXPECT_EQ(testUsedBufferSize, syncBufferHandler->usedBufferSize);
|
||||
}
|
||||
|
||||
TEST(SyncBufferHandlerDeviceTest, givenMultipleSubDevicesWhenAllocatingSyncBufferThenClonePageTables) {
|
||||
UltDeviceFactory ultDeviceFactory{1, 2};
|
||||
auto rootDevice = ultDeviceFactory.rootDevices[0];
|
||||
rootDevice->allocateSyncBufferHandler();
|
||||
auto syncBufferHandler = reinterpret_cast<MockSyncBufferHandler *>(rootDevice->syncBufferHandler.get());
|
||||
|
||||
EXPECT_TRUE(syncBufferHandler->graphicsAllocation->storageInfo.cloningOfPageTables);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -29,7 +29,8 @@ void SyncBufferHandler::makeResident(CommandStreamReceiver &csr) {
|
||||
void SyncBufferHandler::allocateNewBuffer() {
|
||||
AllocationProperties allocationProperties{device.getRootDeviceIndex(), true, bufferSize,
|
||||
GraphicsAllocation::AllocationType::LINEAR_STREAM,
|
||||
false, false, device.getDeviceBitfield()};
|
||||
(device.getNumGenericSubDevices() > 1u), /* multiOsContextCapable */
|
||||
false, device.getDeviceBitfield()};
|
||||
graphicsAllocation = memoryManager.allocateGraphicsMemoryWithProperties(allocationProperties);
|
||||
UNRECOVERABLE_IF(graphicsAllocation == nullptr);
|
||||
|
||||
|
Reference in New Issue
Block a user